Python库:googlesearch,获取google搜索结果真实着陆页URL

老丁

效果如下图所示:

8C2AC29B-3D40-4257-8E96-0267EC6C989C.png

地址:https://pypi.org/project/googlesearch-python/

注意:需要挂代理,否则还是无法访问google

1,安装:pip3 install googlesearch-python

2,就一个功能,

googlesearch.search(str: term, int: num_results=10, str:) -> list

def get_links_from_google(term, num_results=10,lang='en'):
    url_list = [x for x in search(term=term,lang='en', num_results=num_results)]
    return url_list

3,可以准备一批关键词,获取这批关键词前10的搜索结果,筛选出现次数最多的域名,然后研究...


主要是用于竞品页面的分析研究,对于平时找竞品,以及分析竞品省去一些繁琐的工作;


附国外小哥玩得更6,https://github.com/pavelchowdhury99/seo_keyword_extraction/tree/875394f95b4721a70a8cf891129d24104d34375a

# Step 1. 获取google搜索结果着陆页URL;

# Step 2. 获取排名高的网页内容;

# Step 3. 清洗这些网页内容;

# Step 4. 用TextRank模型找出这些排名前面的网页,所使用的最常出现的字词。

发表评论

快捷回复: 表情:
AddoilApplauseBadlaughBombCoffeeFabulousFacepalmFecesFrownHeyhaInsidiousKeepFightingNoProbPigHeadShockedSinistersmileSlapSocialSweatTolaughWatermelonWittyWowYeahYellowdog
评论列表 (暂无评论,509人围观)

还没有评论,来说两句吧...