Skip to content

Commit

Permalink
fetch-docs: Add User-Agent to session
Browse files Browse the repository at this point in the history
Adding User-Agent as an attempt to fix the 403 Client Errors returned
from requests to GitHub.
  • Loading branch information
joverlee521 committed Nov 27, 2024
1 parent 9353651 commit c561b61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/fetch-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
if __name__ == '__main__':
# Use a Session for connection pooling
session = requests.Session()
session.headers.update({
"User-Agent": "https://github.com/nextstrain/docs.nextstrain.org ([email protected])",
})

class RemoteDoc:
def __init__(self, source_url, dest_path):
Expand Down

0 comments on commit c561b61

Please sign in to comment.