flint.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:llk 作者: Tycx2ry 项目源码 文件源码
def query(self, f_table, f_keyword, f_type = None, f_netmask = None):
        path = "/api/%s/keyword/%s/" %(f_table, f_keyword)
        if f_type is not None:
            path = "%srtype/%s/" %(path, FLINT_TYPES[f_type])
        if f_netmask is not None:
            path = "%smask/%s/" %(path, str(f_netmask))
        #if options.source:
            #path = "%ssource/%s/"%(path, str(options.source))
        if self.api.startswith("http://"):
            url = "%s%s" %(self.api, path)
        else:
            url = "http://%s%s" %(self.api, path)

        req = urllib2.Request(url)
        req = self.setup_header(req, path)

        return self._do_query(req, max_retry = self.MAX_RETRY)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号