出现重复的URL

来源:14-10 获取和解析列表页-1

weixin_慕勒4383646

2019-06-14

老师请问在”def parse_list(url): ” 中执行
if tr.xpath("//td[3]/a[@class='forums_title ']/@href").extract():
topic_url = parse.urljoin(domain, tr.xpath("//td[3]/a[@class='forums_title ']/@href").extract()[0])
print(topic_url)
为什么会出现如下重复:
未结
400
https://bbs.csdn.net/topics/392700588
未结
400
https://bbs.csdn.net/topics/392700588
未结
400
https://bbs.csdn.net/topics/392700588

写回答

1回答

bobby

2019-06-17

能否贴一下你的代码? 以及你这里的出错的问题? 你这个问题我还不是很明白是什么意思

0
5
bobby
回复
weixin_慕勒4383646
好的,加油
2019-06-26
共5条回复

Python爬虫工程师实战 大数据时代必备

慕课网严选精品教程,高质量内容+服务!

2377 学习 · 1158 问题

查看课程