V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
linw1995
V2EX  ›  Python

一年内写了两个数据提取的轮子

  •  
  •   linw1995 ·
    linw1995 · 2020-06-12 20:26:09 +08:00 · 2312 次点击
    这是一个创建于 1385 天前的主题,其中的信息可能已经有所发展或是发生改变。

    平时写爬虫时突然冒出来的想法,让我写了这两个轮子。主要是为了方便自己的爬虫提取来自不同文本格式的数据。

    data_extractor

    支持 XPath, CSS-Selectors 及 JSONPath 。

    jsonpath_extractor

    在用 python-jsonpath-rw 这个库时,觉得用起来很变扭。所以就自己写了个轮子,用来提取 JSON 格式的文本数据。

    发这个帖子的目的主要是求 star ;二是因为自己用的感觉很不错,想安利一下大家。

    3 条回复    2020-06-13 01:30:35 +08:00
    arrow8899
        1
    arrow8899  
       2020-06-12 20:37:55 +08:00
    crs0910
        2
    crs0910  
       2020-06-12 20:50:45 +08:00
    二连送上
    linw1995
        3
    linw1995  
    OP
       2020-06-13 01:30:35 +08:00
    @arrow8899 自从 jsonpath-extractor 实现了 CLI 后,我就用 jq 来 highlighting 提取的结果。以后可能会参考 jq 来做复杂的提取
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2525 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 15:59 · PVG 23:59 · LAX 08:59 · JFK 11:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.