mwmbl / crawler-script Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
Would be ideal that, given a domain, the crawler was capable of detecting the sitemap or accepting a sitemap as parameter.
I would think in the following workflow:
This would be both for main urls or secondary urls (there are sub-sitemaps and specially if you are using routes and behind reverse proxy server).
(crawler-script-py3.9) mwmbl@debian-pc:~/crawler-script$ python main.py
INFO:__main__:Got batch with 100 items
INFO:__main__:Crawled batch in 169.679112 seconds
INFO:__main__:Sending batch
INFO:__main__:Response status: 200, b'{"status":"ok","public_user_id":"4a22e1caa9461233746ac43c02bee5a44a109e846c41d65f9f9db104063bc81c","url":"https://f004.backblazeb2.com/file/mwmbl-crawl/1/v1/2023-01-16/1/4a22e1caa9461233746ac43c02bee5a44a109e846c41d65f9f9db104063bc81c/76989__e32bd971.json.gz"}'
INFO:__main__:Got batch with 100 items
INFO:__main__:Crawled batch in 179.940824 seconds
INFO:__main__:Sending batch
INFO:__main__:Response status: 200, b'{"status":"ok","public_user_id":"4a22e1caa9461233746ac43c02bee5a44a109e846c41d65f9f9db104063bc81c","url":"https://f004.backblazeb2.com/file/mwmbl-crawl/1/v1/2023-01-16/1/4a22e1caa9461233746ac43c02bee5a44a109e846c41d65f9f9db104063bc81c/77171__105d5086.json.gz"}'
INFO:__main__:Got batch with 100 items
ERROR:__main__:Unable to decode robots file
Traceback (most recent call last):
File "/srv/mwmbl/crawler-script/main.py", line 100, in robots_allowed
parse_robots.parse(content.decode('utf-8').splitlines())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 517: invalid continuation byte
I have ran into major IP address blocking because of the number of requests.
Recently, it happened with the fixed IP in my job and we received a question from our ISP.
Not like most people fall into this but may harm crawling even in dynamic IP addresses environments.
Maybe we should have an option to limit the number of requests per time to a specific website / domain / IP address.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.