推荐学习书目
› 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
caizixian
V2EX  ›  Python

Scrapy 的结果如何处理?

  •  
  •   caizixian ·
    caizixian · Jan 19, 2015 · 3092 views
    This topic created in 4269 days ago, the information mentioned may be changed or developed.
    用Scrapy爬了一些数据,弄成了JSON。
    接下来有搜索的需要。
    JSON类似于
    {"name":.....,"para1":.....,"para2":.....,}

    需求就是模糊搜索name,输出para1,para2。
    JSON文件大约300多MB,十几万行。
    求高效的处理方式。

    顺便问一下,用Python处理较大的JSON文件有什么好办法?还是说直接上C Binding?

    Thx!
    6 replies  •  2015-05-07 11:48:11 +08:00
    linnchord
        1
    linnchord  
       Jan 19, 2015
    十几万行 放数据库不是挺好吗
    caizixian
        2
    caizixian  
    OP
       Jan 19, 2015
    @Livid @binux 有什么建议吗?
    tennix
        3
    tennix  
       Jan 19, 2015
    这种 json 数据最适合放到文档数据库里了,比如 mongodb, mongo 的查询功能也算比较强大
    binux
        4
    binux  
       Jan 19, 2015
    1、放内存
    2、放数据库
    3、放elasticsearch
    yakczh
        5
    yakczh  
       Jan 19, 2015
    scrapy检测网站内容更新有什么好的方案?
    Moker
        6
    Moker  
       May 7, 2015
    我现在也存成了JSON 可是 存数据库老是出错...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3144 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 00:04 · PVG 08:04 · LAX 17:04 · JFK 20:04
    ♥ Do have faith in what you're doing.