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

关于 selenium 的 webdriver ,部分网页加载不出来

  •  
  •   levenwindy · 2022-01-09 13:54:46 +08:00 · 2180 次点击
    这是一个创建于 809 天前的主题,其中的信息可能已经有所发展或是发生改变。
    这几天爬王者荣耀的数据玩 hy 的赛事竞猜,但是 cookie 经常失效,所以想着账号密码自动登录获取 cookieshttps://datamore.qq.com/project/wzmatch/dist/index.html#/

    上面网页-登录-(微信登录 /qq 用户登录),正常来说,点击-qq 用户登录-就会弹出 (快速安全登录)界面,但是 webdriver 却怎么也点不开,手动也不行
    Google Version 97.0.4692.71 (Official Build) (64-bit) 目前最新版
    9 条回复    2022-01-11 18:02:02 +08:00
    em70
        1
    em70  
       2022-01-09 15:18:55 +08:00
    要隐藏 selenium 的痕迹,不然那边会判断出来
    levenwindy
        2
    levenwindy  
    OP
       2022-01-09 22:03:23 +08:00
    @em70 谢谢,网上找了 stealth.min.js 隐藏,还行不行,看来腾讯反扒比较难搞
    ilikekotori
        3
    ilikekotori  
       2022-01-10 00:43:07 +08:00
    要不试试 firefox
    happy61
        4
    happy61  
       2022-01-10 01:47:05 +08:00
    可以试试“精易 VIP 模块”,比这个好用多了。。。10 块一个月。。有一些奇怪的事情还是易语言比较多解决方案
    jeeyong
        5
    jeeyong  
       2022-01-10 02:51:01 +08:00
    stealth.min.js 貌似有些参数失效了..
    而且他会改原生函数
    比如你 typeof 一个函数,出来得是 native 得.
    但是改过了就不是这个了...
    这也是反 selenium 得方法之一.
    ji980925
        6
    ji980925  
       2022-01-10 09:30:33 +08:00 via Android
    我记得好像要修改 chrome driver 的特征,或者你试试这个 https://github.com/ultrafunkamsterdam/undetected-chromedriver
    levenwindy
        7
    levenwindy  
    OP
       2022-01-10 19:56:29 +08:00 via Android
    @happy61
    @ji980925
    好的,谢谢,我试试
    imn1
        8
    imn1  
       2022-01-11 12:26:26 +08:00
    腾讯的反爬(风控)不是那么好对付的,当然我是盲猜的,没有试过,暴露 ip 的情况下不太敢碰腾讯
    levenwindy
        9
    levenwindy  
    OP
       2022-01-11 18:02:02 +08:00
    @ji980925 解决了!!大大的感谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1402 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 17:34 · PVG 01:34 · LAX 10:34 · JFK 13:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.