Repository navigation
Fix energyjobline: wrong User-Agent served zero real content at scale #3143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -354,7 +354,10 @@ func All(c HTTPClient) map[string]Source { | |||||||||||||||||
| // listing and detail pages are fully static server-rendered HTML. | ||||||||||||||||||
| NewStaffy(c), | ||||||||||||||||||
| NewDataArt(c), | ||||||||||||||||||
| NewEnergyJobline(c), | ||||||||||||||||||
| // energyjobline's detail pages need the Googlebot UA (see crawlerUserAgent) and are | ||||||||||||||||||
| // rate-paced (pacedHTMLGetter, see energyjoblineRequestInterval); the sitemap does | ||||||||||||||||||
| // not, so it stays on the shared client. | ||||||||||||||||||
| NewEnergyJobline(c, pacedHTMLGetter(newCrawlerUAClient(), energyjoblineRequestInterval, energyjoblineRequestBurst)), | ||||||||||||||||||
|
Comment on lines
+357
to
+360
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Pace the sitemap getter separately.
🐛 Suggested fix- NewEnergyJobline(c, pacedHTMLGetter(newCrawlerUAClient(), energyjoblineRequestInterval, energyjoblineRequestBurst)),
+ NewEnergyJobline(pacedHTMLGetter(c, 10*time.Second, 1), pacedHTMLGetter(newCrawlerUAClient(), energyjoblineRequestInterval, energyjoblineRequestBurst)),📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| // JettyCloud: its postings exist only on its own careers site — the employer runs no | ||||||||||||||||||
| // ATS a crawl can reach, so this adapter is the only way the catalogue can carry it. | ||||||||||||||||||
| NewJettyCloud(c), | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Set the EnergyJobline detail interval to 10 seconds.
The reachable detail path passes through the paced HTML getter and calls
e.pages.GetHTML(ctx, link). The current1500 * time.Millisecondinterval allows detail requests every 1.5 seconds, but the repository documents EnergyJobline'sCrawl-delay: 10. Set this interval to 10 seconds.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents