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
cnqncom
V2EX  ›  Python

谁能说说 python 和 php 数据采集方面的各自特点吗?

  •  
  •   cnqncom · 2016-11-02 22:44:45 +08:00 via Android · 3058 次点击
    这是一个创建于 2724 天前的主题,其中的信息可能已经有所发展或是发生改变。
    没研究过 python,数据采集都是用 php 的 curl 。感觉也是很强大的,不知道 python 数据采集相比有什么特点?
    3 条回复    2016-11-03 11:21:35 +08:00
    gouchaoer
        1
    gouchaoer  
       2016-11-02 23:53:08 +08:00 via Android
    py 轮子多,用的人更多
    php 的 web 相关库更强大,内容处理更方便吧
    waytoexplorer
        2
    waytoexplorer  
       2016-11-02 23:59:50 +08:00 via iPhone
    php 适合小规模小难度采集。 python 更容易以较少的资源和较高的并发实现大规模数据采集
    Vanry
        3
    Vanry  
       2016-11-03 11:21:35 +08:00   ❤️ 1
    会啥用啥
    数据采集无非是一个 http client 和一个 html parser
    php 的 http client 有 php-curl-class, requests, httpful, buzz 和强大的 guzzle 大多都支持 multi curl 的多线程
    html 解析可以用 symfony 的 dom crawler 和轻量小巧的 didom
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2791 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:40 · PVG 22:40 · LAX 07:40 · JFK 10:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.