推荐学习书目
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 · 4109 views
    This topic created in 2613 days ago, the information mentioned may be changed or developed.

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

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

    请问怎么怎么设置,谢谢

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