Repository navigation
Commit 4a4fd8f
authored
fix(throttling-manager): Use the longest robots.txt crawl-delay (#2520)
### Description
When one domain gets crawl-delays from several robots.txt files,
`ThrottlingRequestManager` now keeps the longest one instead of the
first. Several files cover one domain for a site and its subdomains
under `throttle_by='registrable_domain'`, and for HTTP and HTTPS of one
host. A robots.txt re-fetch still can't speed a domain up, it can only
slow it down.
The same change for Crawlee JS is tracked in apify/crawlee#4491, with a
fix proposed in apify/crawlee#4493.
### Issues
- Follow-up: #2507
*✍️ Drafted by Claude Code*1 parent b390f63 commit 4a4fd8f
4 files changed
Lines changed: 26 additions & 12 deletions
File tree
- docs
- 03_concepts
- 06_upgrading
- src/crawlee/request_loaders
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
507 | 509 | | |
508 | 510 | | |
509 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
466 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
467 | 468 | | |
468 | 469 | | |
469 | 470 | | |
| |||
571 | 572 | | |
572 | 573 | | |
573 | 574 | | |
574 | | - | |
| 575 | + | |
575 | 576 | | |
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
579 | | - | |
| 580 | + | |
580 | 581 | | |
581 | 582 | | |
582 | 583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
532 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
533 | 544 | | |
534 | 545 | | |
535 | 546 | | |
536 | | - | |
| 547 | + | |
537 | 548 | | |
538 | 549 | | |
539 | | - | |
| 550 | + | |
540 | 551 | | |
541 | 552 | | |
542 | | - | |
543 | | - | |
| 553 | + | |
| 554 | + | |
544 | 555 | | |
545 | 556 | | |
546 | 557 | | |
| |||
550 | 561 | | |
551 | 562 | | |
552 | 563 | | |
553 | | - | |
| 564 | + | |
554 | 565 | | |
555 | 566 | | |
556 | 567 | | |
| |||
0 commit comments