Comments (2)
Amazing, that really helped. Thank you for being so kind and properly explaining everything!
from advertools.
Thanks @alexhopes
Glad you liked it!
Yes, since the function uses only the HEAD
method, it is extremely fast, and therefore sends many requests to the server. You would typically get a 429 "too many requests" status code, asking you to slow down the requests. This does not mean that there is anything wrong with the page.
-
Retries: the crawler already runs retries for each URL by default, and this can be modified using the
custom_settings
parameter. -
Concurrent requests: If you are getting a 429 error, you can slow down your crawling by also using
custom_settings
.
You can use any combination of the following custom settings to manage your crawling speed as needed:
import advertools as adv
adv.crawl_headers(URL_LIST, "output_file.jl",
custom_settings={
"RETRY_TIMES": 10, # defaults to 2
"CONCURRENT_REQUESTS": 1, # defaults to 16
"CONCURRENT_REQUESTS_PER_DOMAIN": 1, # defaults to 8
"DOWNLOAD_DELAY": 0.75, # defaults to 0
}
There are also some SEO crawling scripts and recipes that you might be interested in. Also, check out Scrapy's settings for more details on what each of them means.
Hope that helps.
from advertools.
Related Issues (20)
- Getting NaN values for serp_goog function HOT 3
- File not found on crawl method HOT 4
- opening .jl file command doesn't show 'my_output_file.jl' HOT 7
- crawl dataFrame - jsonld objects HOT 2
- Suggestion - don't treat jsonld items in distinct script tags as distinct. HOT 8
- How to get initial url in output.jl ? HOT 2
- Bypass protection HOT 3
- Need some way to rate limit requests for sitemap_to_df HOT 3
- Scraps forever HOT 3
- Feature Request - Alternative Crawl Output HOT 5
- Python 3.10/11 SSL: SSLV3_ALERT_HANDSHAKE_FAILURE HOT 5
- Advertools in Ubuntu in a Venv (Python 3.10.12 and Python 3.9.18) HOT 7
- browser can get https://zapier.com but when run scrape failed HOT 2
- logs_to_df() Limitation HOT 5
- Bypass a cookie wall HOT 4
- Pandas Futurewarning "fillna" in url_to_df() HOT 1
- request_url_df creates wide list? HOT 3
- How to get started with development? HOT 7
- Instagram Mentions Allows Periods HOT 1
- about this result in serp HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advertools.