You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moves the requests a harvest makes into an HttpClient that waits out the
crawl delay before each one. Previously the delay was applied once per
page of search results, so a Blacklight 7 harvest could issue 100
document requests back to back before it took effect.
Each request continues to get its own connection rather than reusing one,
which is likewise more likely to be accepted by a WAF; the client is now
the single place that behavior is decided. Fractional delays work too.
A response class builds a client for itself when it isn't given one, and
passes along the logger it was given so request logging doesn't quietly
go somewhere else.
Harvester request specs now stub HTTP with webmock rather than mocking
Net::HTTP.get, since the request path is no longer a single class method.
Closes#209
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,7 +191,9 @@ end
191
191
192
192
##### Crawl Delays (default: none)
193
193
194
-
Crawl delays can be configured (in seconds) either globally for all sites or on a per-site basis. This will cause a delay for that number of seconds between each search results page (note that Blacklight 7 necessitates a lot of requests per results page and this only causes the delay per page of results)
194
+
Crawl delays can be configured (in seconds, and fractions of a second are allowed) either globally for all sites or on a per-site basis. The harvester waits out the delay before every request it makes, not just before each page of search results -- which matters because Blacklight 7 and above needs a request per document, so one page of results is many requests. Each request also gets its own connection instead of reusing one. Together, pacing requests and connecting fresh make a harvest much less likely to be turned away by a WAF or other bot mitigation.
195
+
196
+
Be aware that this makes a harvest take considerably longer than it did when the delay applied per page: a one second delay against a Blacklight 7 site with 10,000 records is around three hours of waiting. Lower the delay if that matters more to you than getting past bot mitigation.
0 commit comments