推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
leewlab
V2EX  ›  Python

PySpider 如何去重?

  •  
  •   leewlab · Apr 23, 2019 · 4392 views
    This topic created in 2756 days ago, the information mentioned may be changed or developed.

    pyspider 如何对某一个抓取值去重,不是 url 去重

    比如我抓了很多文章,同样文章标题的不去抓取,过滤掉

    请问怎么怎么设置,谢谢

    7 replies  •  2019-04-23 11:59:17 +08:00
    est
    est
    Apr 23, 2019 via Android
    1
    pyspider 都会了还不会去重?最笨的办法就是用 == 逐个比
    seaguest
    seaguest
    Apr 23, 2019
    2
    数据量大的时候可以考虑 bloom filter,cuckoo filter。
    ztcaoll222
    ztcaoll222
    Apr 23, 2019
    3
    不就是和 url 去重一样吗
    url 你怎么去重标题就怎么去重
    Northxw
    Northxw
    Apr 23, 2019
    4
    如果你存数据库,可以尝试 md5 一个唯一值,然后检查(或者布隆过滤器?不清楚)
    lanpong
    lanpong
    Apr 23, 2019 via iPhone
    6
    楼上作者出没
    KyonLi
    KyonLi
    Apr 23, 2019 via iPhone
    7
    自定义 taskid 吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   546 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 22:05 · PVG 06:05 · LAX 14:05 · JFK 17:05
    ♥ Do have faith in what you're doing.