Skip to content
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

Domain/pattern-based user agent overrides #463

Open
JustAnotherArchivist opened this issue Sep 10, 2020 · 0 comments
Open

Domain/pattern-based user agent overrides #463

JustAnotherArchivist opened this issue Sep 10, 2020 · 0 comments

Comments

@JustAnotherArchivist
Copy link
Contributor

JustAnotherArchivist commented Sep 10, 2020

  • Facebook doesn't like our UA.
  • Twitter requires the AB UA for useful archival.
  • Tumblr requires a browser UA.
  • Flickr blocks AB UA requests with a 503.
  • GitHub serves an ugly 'unsupported browser' banner if requested with the default AB UA.
  • and so on...

While annoying, this can be handled for jobs explicitly targeting those sites using --useragent. However, outlinks from other sites might be screwed. I propose adding a mechanism that overrides the user agent on a per-request basis. If the request matches a regular expression, the UA is overridden for that request. As an optimisation, hostname matching would also be possible to skip expensive regex matching, possibly also with wildcards for any subdomain. This may require changes in wpull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant