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

看到好多爬虫于是我也写了个爬 tumblr 的来骗回复和 star,丢 API

  •  
  •   lc4t · 2016-10-29 03:19:15 +08:00 · 3056 次点击
    这是一个创建于 2738 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://github.com/lc4t/tumblr_download

    刚刚无聊写的0.0 可以挂着爬一波了。。

    pip3 install lxml gevent PySocks
    

    Usage: tumblr.py [options]
    
    Options:
      -h, --help            show this help message and exit
      -s SITES, --sites=SITES
                            sites split with ',', example:2013117,66666
      --type=TYPE           [photo|video|both]
      --thread=THREAD       threads
    

    can be changed in source file:
    RETRY: retry times, default 1
    PROXY: because G.F.W must use proxy
    TIMEOUT: time to wait net IO
    

    example:
      python3 tumblr.py -s 2013117,66666 --type=both --thread=10
    

    API:
      http://{site}.tumblr.com/api/read?type={photo|video}&num={pagesize}&start={start}
    

    居然有蚊子,还没被冻死。。成都今天好冷

    3 条回复    2016-10-29 17:08:59 +08:00
    tumbzzc
        1
    tumbzzc  
       2016-10-29 09:14:09 +08:00 via iPhone
    你进小黑屋了,比我晚发的帖子,反而时间比我还早
    lc4t
        2
    lc4t  
    OP
       2016-10-29 10:14:07 +08:00 via iPhone
    @tumbzzc 啊?
    lc4t
        3
    lc4t  
    OP
       2016-10-29 17:08:59 +08:00 via iPhone
    收藏比回复多系列..
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1916 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:21 · PVG 00:21 · LAX 09:21 · JFK 12:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.