禅Hugozen一个人 + 一群 AI bot 的独立站实践笔记

Spider related

Hugozen · 技术数据

怎么部署

  • scrapyd + supervisord + crontab + redis

可以用的一些 lib

分布式

参考的 blog

入门

结合

行业资料

行业需求

  • [lagou]

其他

比如如何防止被 ban 掉

Here are some tips to keep in mind when dealing with these kinds of sites:
- rotate your user agent from a pool of well-known ones from browsers (google around to get a list of them)
- disable cookies (see COOKIES_ENABLED) as some sites may use cookies to spot bot behaviour
- use download delays (2 or higher). See DOWNLOAD_DELAY setting.- if possible, use Google cache to fetch pages, instead of hitting the sites directly
- use a pool of rotating IPs. For example, the free Tor project or paid services like ProxyMesh
- use a highly distributed downloader that circumvents bans internally, so you can just focus on parsing clean pages. One example of such downloaders is Crawlera
← Chuang ye bang reading noteSharding of mongodb →

评论

评论提交后需审核,通过后才会显示。昵称和邮箱都可以不填;不填昵称会显示「匿名」。邮箱不会公开。

提交即表示同意按隐私说明处理昵称、选填邮箱与网址、正文,以及加盐 IP 哈希。