名称: ConnectAI-E/githubTrendData
地址: https://github.com/EricLULU/githubTrendData
开发语言: python
简介: Github 热门趋势排行榜爬虫
将标题由h1 class=“h3 lh-condensed”> 改为了h2 class=“h3 lh-condensed”>
同时,为了更好地获取仓库的名字,选择直接从 a 标签的 href 属性中直接读取,不再读取 a 标签内的文本值。如第二个和第三个框所示。
1. 查找标题的标签
repo = article.find(‘h1’, {‘class’: ‘lh-condensed’})
修改成
repo = article.find(‘h2’, {‘class’: ‘lh-condensed’})
修改成
repo_text = replaces(repo_a.get(‘href’))
有正在使用当前爬虫的小伙伴,请及时更新代码,保证爬虫可用,爬虫获取地址:
https://github.com/ConnectAI-E/Feishu-OpenAI