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
0littleboy
V2EX  ›  Python

如何爬取 leetcode 上的所有历史竞赛分数数据?

  •  
  •   0littleboy · 2022-12-15 11:35:26 +08:00 · 2083 次点击
    这是一个创建于 495 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://leetcode.cn/u/johnkram/ 为例

    zoGvLD.png

    内部内容是以 svg 图的形式呈现的,那如何使用 Python 爬虫爬取所有的历史数据呢

    zoJkSP.png

    通过 network 可以看到访问了一些东西,我不知道如何提取他们

    3 条回复    2022-12-16 11:07:25 +08:00
    czgaotian
        1
    czgaotian  
       2022-12-15 11:40:23 +08:00
    leetcode api 都是 graphql 的呀
    darkengine
        2
    darkengine  
       2022-12-15 11:41:49 +08:00
    搜索 leetcode graphql
    liutao1998
        3
    liutao1998  
       2022-12-16 11:07:25 +08:00
    https://github.com/xjq7/lc-helper, 参考我做的 力扣辅助工具, 本质还是 http, 入参 抓包看看就知道了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1035 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:16 · PVG 06:16 · LAX 15:16 · JFK 18:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.