Code Monkey home page Code Monkey logo

antispider's Introduction

antispider

记录一下碰到过的反爬虫措施和解决办法,欢迎交流!!!

第二级目录无限制


首次访问会出现js中间页跳转 估计是验证ip


页面加载时间特长


discuz论坛板块接口


需要验证referer


js跳转 changde.py


cookie加密验证天眼查 test_down_tianyancha.py


逗比验证码+%99验证失败

http://xygs.gsaic.gov.cn/gsxygs/pub!list.do


豆瓣FM及其他豆瓣网站 https 不严密的cookie参数 test_down_douban.py

js执行后url增加_dsign参数 get_dsign.py

访问显示安全检查中... 5秒后经过js跳转到正常页面

文字使用css样式代替

限制访问频率以及代理类型

  • https://m.guazi.com/bj/dazhong/
  • 访问频率要小于 0.5次/s
  • 如果使用代理的话 http协议要用http协议的代理 https要用https的代理,混用的话相当于没加代理

巧妙使用\r在不同平台的差异让爬虫开发者头疼

  • \r在linux下会被解释为回车,如果使用\r当做换行符,在网页和windows上显示都没有问题,但在linux下输出的时候测绘覆盖\r之前的字符,导致输出结果和网页上看到的少很多。。,如果不太明白\r含义的话,想必要调试很久很久很久很久吧。。。

爬虫技巧-西瓜视频MP4下载地址获取

antispider's People

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.