V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
yellowmarlboro
V2EX  ›  Python

跪求某猫列表页抓取办法, 菜鸡我要自闭了.

  •  
  •   yellowmarlboro · Oct 22, 2018 · 5620 views
    This topic created in 2744 days ago, the information mentioned may be changed or developed.

    比如 https://list.tmall.com/search_product.htm?s=0&cat=50103156&amp&brand=94136&amp&q=%B7%A2%C4%A4&amp&sort=s&amp&style=g&amp&search_condition=23&amp&from=sn__brand-qp&amp&active=1&amp&industryCatId=50103156&amp&spm=a220m.1000858.1000721.1.6bdd6701AdE1fX 想问有没有不需要登陆 /账号信息抓取的方法, 找了几个接口, 都需要登陆, 即使带上登陆 cookie 不久也会被封, 关键现在不给账号密码, 只有 cookie, 模拟登陆也不能. 有没有大佬有比较好的办法或者接口.

    觉得这是一个很无理的问题 -.- , 不过我要自闭了

    24 replies    2018-10-23 22:09:38 +08:00
    Yourshell
        1
    Yourshell  
       Oct 22, 2018
    你模拟一下浏览器, 别直接 requests。
    insomnia1232
        2
    insomnia1232  
       Oct 22, 2018
    把 useragent 改成浏览器?反正就是伪装成浏览器
    ljspython
        3
    ljspython  
       Oct 22, 2018
    没代理池你还想爬天猫?
    jdgui
        4
    jdgui  
       Oct 22, 2018
    帮忙人工置顶。。
    之前遇到过一个外包,考虑到阿里变态的反爬虫没做。
    坐等大佬答疑解惑,有答案了 @我一下。。
    beny2mor
        5
    beny2mor  
       Oct 22, 2018
    算了呦
    你猫的账号被封了怎么办。。。
    PulpFunction
        6
    PulpFunction  
       Oct 22, 2018
    哈哈 我有方案,已经成熟

    正研究店铺所有物品
    VDimos
        7
    VDimos  
       Oct 22, 2018 via Android
    没点儿 ip 敢爬阿里系,佩服
    realpg
        8
    realpg  
    PRO
       Oct 22, 2018
    小学生挑战哥德巴赫猜想系列
    Nimrod
        9
    Nimrod  
       Oct 22, 2018
    点进来之前以为是猫眼的我 233333
    huaerxiela
        10
    huaerxiela  
       Oct 22, 2018
    登陆账号也会各种验证你
    NLL
        11
    NLL  
       Oct 22, 2018
    是不是频率太快了?
    251243021
        12
    251243021  
       Oct 22, 2018
    ip 池.不然稍微多了点就被会扳
    zr8657
        13
    zr8657  
       Oct 22, 2018
    selenium 打开百度,用那个百度搜天猫,然后打开就不会直接要求你登录了。还是多换 IP,我也正在爬某猫
    alcarl
        14
    alcarl  
       Oct 22, 2018 via Android
    我很好奇,爬这个有啥用吗?
    cdwyd
        15
    cdwyd  
       Oct 22, 2018
    天猫的反爬虫挺变态的,貌似会自我学习,你研究出来一个办法,过一段时间后就失效了
    murmur
        16
    murmur  
       Oct 22, 2018
    爬阿里系可悠着点 毕竟自己还要用支付宝和淘宝
    murmur
        17
    murmur  
       Oct 22, 2018
    @zr8657 阿里的代码里很容易就找到$cdc_asdjflasutopfhvcZLmcfl_"in document||navigator.webdriver 这种检测自动化的代码
    兄弟是自己改过变量名重新编的么
    ctro15547
        18
    ctro15547  
       Oct 22, 2018
    需求说明白点?。。这种页面如果牺牲效率的话,爬起来挺简单的。。
    wmhx
        19
    wmhx  
       Oct 22, 2018
    国内的需要手机号, 而且都比较变态啊 , 那点钱真不值得.
    update
        20
    update  
       Oct 23, 2018
    试试 chrome 的 Web Scraper 插件
    locoz
        21
    locoz  
       Oct 23, 2018
    给你个提示,尝试一下 H5 版本的搜索接口
    locoz
        22
    locoz  
       Oct 23, 2018
    然后就是阿里系的东西都需要有比较高质量的 IP 才能大量爬,账号不是必须的
    zr8657
        23
    zr8657  
       Oct 23, 2018
    @murmur selenium 用 firefox 就检测不到 webdriver,Chrome 就能检测到,找了一天也没找出为什么,头晕
    SpiderXiantang
        24
    SpiderXiantang  
       Oct 23, 2018
    selenium
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4342 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 94ms · UTC 04:12 · PVG 12:12 · LAX 21:12 · JFK 00:12
    ♥ Do have faith in what you're doing.