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

抓取 Twitter, Quora, Reddit 的指定 url 的内容的方法?

  •  
  •   cloud2000 · 144 天前 · 960 次点击
    这是一个创建于 144 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我试了 scapy/request/BeautifulSoup 的方案,只能抓一般网站。
    用来抓 Twitter, Quora 会显示“javascript 不支持"等,Reddit 只能抓到楼主的提问,回复全部抓不到。

    后来改成用 Selenium 倒是可以全部抓了,但是 Selenium 方案太重了。

    请问:
    1.有没有优雅方案可以抓上述几个社交平台指定 url 的内容?
    2.如果没有,有第三方的 API (可以接受付费)支持吗?
    2 条回复    2023-12-05 19:17:42 +08:00
    Retool
        1
    Retool  
       144 天前
    https://rapidapi.com/hub
    里面有很多别人提供的非官方 API ,比如 Twitter API 就有很多,可以对比一下价格选一个划算的(有些免费额度也很高)
    lifei6671
        2
    lifei6671  
       144 天前
    我用 https://github.com/go-rod/rod 来抓取抖音和小红书内容。不过这个是基于 Chrome 的,也挺笨重的。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   941 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:41 · PVG 03:41 · LAX 12:41 · JFK 15:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.