viadeo_search.py 文件源码

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

项目:operative-framework 作者: graniet 项目源码 文件源码
def main(self):
        server = "www.google.fr"
        limit = 100
        if self.get_options('limit') != '':
            limit = int(self.get_options('limit'))
        url = "http://"+server+"/search?num="+str(limit)+"&start=10&hl=en&meta=&q=site%3Afr.viadeo.com/fr/profile/%20"+self.get_options('enterprise')
        r=requests.get(url)
        results = r.content
        regex = re.compile("\>fr\.viadeo\.com\/fr\/profile\/(.*?)\<\/cite")
        output = regex.findall(results)
        if len(output) > 0:
            print Fore.GREEN + "Viadeo result : "+ Style.RESET_ALL
            for line in output:
                if line.strip() != "":
                    print Fore.BLUE + "* " + Style.RESET_ALL + line.strip()
                    self.export.append(line.strip())
        else:
            print Fore.RED + "* "+Style.RESET_ALL + "No result found"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号