Coder Social home page Coder Social logo

关于反爬 about spider_xhs HOT 6 OPEN

Rocket-bw avatar Rocket-bw commented on September 17, 2024
关于反爬

from spider_xhs.

Comments (6)

cv-cat avatar cv-cat commented on September 17, 2024

一下子爬3k个笔记会封,参考这个体积就行

from spider_xhs.

Heriec avatar Heriec commented on September 17, 2024

那爬取的时间间隔呢

一下子爬3k个笔记会封,参考这个体积就行

from spider_xhs.

cv-cat avatar cv-cat commented on September 17, 2024

就是一直爬 无间隔

from spider_xhs.

Heriec avatar Heriec commented on September 17, 2024

就是一直爬 无间隔

不,我的意思是,爬完3k条记录sleep多久可以执行下一次,后续账号再爬不了几条直接会登录过期了。
还有一个疑问,在搜索时的请求体中的一个search_id您写死的,但是我在使用搜索时发现这个值是可以变换的,好像不同的用户会拥有不同的值,所搜索的记录也是不一样的(我不确定是不是这样的),而当我想只搜索视频,note_type也就是1时,search_id与note_type=0时也不相同,不知道是什么算法导致的区别

from spider_xhs.

Seven-Circles avatar Seven-Circles commented on September 17, 2024

就是一直爬 无间隔

不,我的意思是,爬完3k条记录sleep多久可以执行下一次,后续账号再爬不了几条直接会登录过期了。 还有一个疑问,在搜索时的请求体中的一个search_id您写死的,但是我在使用搜索时发现这个值是可以变换的,好像不同的用户会拥有不同的值,所搜索的记录也是不一样的(我不确定是不是这样的),而当我想只搜索视频,note_type也就是1时,search_id与note_type=0时也不相同,不知道是什么算法导致的区别

您好,我也想知道多久可以执行下一次,如果有答案了可以告知我吗?

from spider_xhs.

Heriec avatar Heriec commented on September 17, 2024

@Seven-Circles
3000次此次登录的cookie就失效了,但是我也不知道有没有好的机制可以规避,我尝试了下述方法,但是效果很差,最后爬了1w不到的数据,实在是账号被封以后再注销再注册登录太麻烦了,所以仅供参考。
因为搜索一个词条限制了200出头的个数,不够我用,所以我设置的多组词条搜索,每组7/8个关键词吧,所以每组200*7=1400篇,我就sleep1小时,每个关键词中间再sleep15分钟,实际会多爬一些,1k?,具体数量就没有统计了,不过还是会cookie失效,然后我再重新登录没几次这个账号不是刚登录就被顶下来,就是账号就封了,好像不会ban ip,直接封账号。

from spider_xhs.

Related Issues (20)

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.