Giter Site home page Giter Site logo

Comments (4)

bighammer-link avatar bighammer-link commented on September 25, 2024

我用了你的脚本,换成自己的cookie,好用,可以签到。 但是在这之前 我也写过其它论坛的签到 我用的是如下代码达到cookie登陆的目的。 但是我发现这种方式 用在汽车之家 登录不了。 我搞不明白 什么原因。我不是专职爬虫开发。 你看看 你能知道原因吗? cookie = '' dd = SimpleCookie(cookie) xx = {v.key: v.value for k, v in dd.items()}

    self.driver.get('https://i.autohome.com.cn/')
    for kk, vv in xx.items():
        self.driver.add_cookie(cookie_dict={'name': kk, 'value': vv})
    self.driver.refresh()

我也不是很清楚,你可以参考以下这个文章 https://www.cnblogs.com/whz0215/p/9676676.html

from common-scripts.

warlock-lv avatar warlock-lv commented on September 25, 2024

用你的脚本,那个cookie会过期,要怎么办?那个cookie里可能有一些关键数据是要变化的?

from common-scripts.

bighammer-link avatar bighammer-link commented on September 25, 2024

用你的脚本,那个cookie会过期,要怎么办?那个cookie里可能有一些关键数据是要变化的?

对的,这个cookie会过期,只会持续一段时间,要定时更新,抓取cookie最好使用浏览器无痕模式抓取

from common-scripts.

bighammer-link avatar bighammer-link commented on September 25, 2024

用你的脚本,那个cookie会过期,要怎么办?那个cookie里可能有一些关键数据是要变化的?

因为,汽车之家登录有滑块验证,使用cookie就是跳过滑过验证这个麻烦

from common-scripts.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.