推荐学习书目
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
plantparknet
V2EX  ›  Python

有谁试过用 python 获取 instagram 某个账号的所有图片么

  •  
  •   plantparknet · Jul 19, 2015 · 5608 views
    This topic created in 3969 days ago, the information mentioned may be changed or developed.
    如题,发现图片全部是javascript加载
    Supplement 1  ·  Jul 19, 2015
    系统是centos 64
    14 replies    2015-07-21 08:24:01 +08:00
    paulw54jrn
        1
    paulw54jrn  
       Jul 19, 2015
    selenium / ghost.py
    frittle
        2
    frittle  
       Jul 19, 2015
    plantparknet
        3
    plantparknet  
    OP
       Jul 19, 2015
    @paulw54jrn 试过selenium,但是centos精简系统,各种报错。
    plantparknet
        4
    plantparknet  
    OP
       Jul 19, 2015
    @frittle File "app.py", line 34
    bytes = requests.get(url).content
    ^
    IndentationError: unexpected indent

    报错了。。。
    plantparknet
        5
    plantparknet  
    OP
       Jul 19, 2015
    @frittle 赞!搞定!不过运行过程中总是报这种错误,何解呢~~

    /usr/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
    InsecurePlatformWarning
    felinx
        6
    felinx  
       Jul 19, 2015
    我刚写过一个20行的代码抓,哈哈
    plantparknet
        7
    plantparknet  
    OP
       Jul 19, 2015
    @felinx 分享出来~~
    felinx
        9
    felinx  
       Jul 19, 2015
    @plantparknet 跟上面的类似,我是直接通过客户端的API抓的
    plantparknet
        10
    plantparknet  
    OP
       Jul 19, 2015
    @felinx 上面的好像木有一个是通过客户端API抓取的~~
    felinx
        11
    felinx  
       Jul 19, 2015
    @plantparknet 好吧,放出来 https://gist.github.com/felinx/8ece2c795eee508a90f9

    最后抓图我是简单的用wget,有需要可以改成用python抓。
    icedx
        12
    icedx  
       Jul 20, 2015
    frittle
        14
    frittle  
       Jul 21, 2015
    @plantparknet 不知道。或许这是「不正当」提取,不过Intagram也没禁用……

    p.s. 那个是username,Instagram的user id 是数字
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1033 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 18:10 · PVG 02:10 · LAX 11:10 · JFK 14:10
    ♥ Do have faith in what you're doing.