Skip to content

Commit 83630fc

Browse files
committed
NOMERGE: Spoof Google Chrome User-Agent
1 parent a4fdc11 commit 83630fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/crystal/download.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@
2929
HTTP_REQUEST_TIMEOUT = 10 # seconds
3030

3131
# The User-Agent string to use for downloads, or None to omit.
32-
_USER_AGENT_STRING = 'Crystal/%s (https://dafoster.net/projects/crystal-web-archiver/)' % __version__
32+
_USER_AGENT_STRING = (
33+
#'Crystal/%s (https://dafoster.net/projects/crystal-web-archiver/)' % __version__
34+
35+
# Chrome
36+
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36'
37+
)
3338

3439
# Whether to log verbose output related to HTTP requests and responses.
3540
# Can be used to inspect the exact request & response lines and headers exchanged.

0 commit comments

Comments
 (0)