我正在使用这个(https://github.com/thibauts/duckduckgo)模块来抓取duckduckgo搜索结果:
>>> import duckduckgo
>>> for links in duckduckgo.search('Yellow Chris Martin',max_results=20):
... print links
在输出中,我得到了搜索结果,并且似乎
重复了 4 次相同的链接
输出:
http://www.youtube.com/watch?v=ZTEKsbLl64w
http://www.youtube.com/watch?v=ZTEKsbLl64w
http://www.youtube.com/watch?v=ZTEKsbLl64w
http://www.youtube.com/watch?v=ZTEKsbLl64w
https://en.wikipedia.org/wiki/Yellow_(Coldplay_song)
https://en.wikipedia.org/wiki/Yellow_(Coldplay_song)
https://en.wikipedia.org/wiki/Yellow_(Coldplay_song)
https://en.wikipedia.org/wiki/Yellow_(Coldplay_song)
http://www.youtube.com/watch?v=1MwjX4dG72s
http://www.youtube.com/watch?v=1MwjX4dG72s
http://www.youtube.com/watch?v=1MwjX4dG72s
http://www.youtube.com/watch?v=1MwjX4dG72s
如何解决此问题并获得与使用搜索引擎时相同的结果。