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

求 Python 会爬虫的大佬帮一个忙(有偿)

  •  
  •   jiaxiangcheng · 2021-03-03 23:39:47 +08:00 · 1552 次点击
    这是一个创建于 1121 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我在重现一个 rest api 的 request 的时候,他那个 header 里面的 cookies 我不知道怎样去生成。在浏览器我手动去按那个按钮让它自己发 request 然后把它用的 cookies 复制粘贴下来是有用的,但是每过几十秒就过期了,然后接下来每次访问都是被 access denied 。我想做一个自动 farm cookies 的 python 脚本,有没有人愿意帮忙?
    6 条回复    2021-03-05 10:45:58 +08:00
    bbsabc2
        1
    bbsabc2  
       2021-03-04 09:50:08 +08:00
    两个方案
    1 、分析原代码,找到 cookie 的修改方法
    2 、直接用 python+selenium+chrome
    frankyxu
        2
    frankyxu  
       2021-03-04 09:55:59 +08:00
    Z3VhcGllckAxMjYuY29t,可以试试,前面是 base64 邮箱编码
    evil0harry
        3
    evil0harry  
       2021-03-04 11:21:35 +08:00
    client = requests.Session()
    client.get()
    SimbaPeng
        4
    SimbaPeng  
       2021-03-04 11:35:20 +08:00
    模拟登录,保存 Cookies 。失效重新登录,刷新 Cookies
    ben5959
        5
    ben5959  
       2021-03-04 13:48:15 +08:00
    能给出网站或者接口地址么
    jeeyong
        6
    jeeyong  
       2021-03-05 10:45:58 +08:00
    看到有偿, 我来了.
    但是你说的问题, 好像不太好意思收钱....
    方便的话放地址, 描述你的需求.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5732 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 01:51 · PVG 09:51 · LAX 18:51 · JFK 21:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.