summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar klea2026-06-01 12:34:50 +0000
committerGravatar klea2026-06-01 12:34:50 +0000
commitc676a16752e0eb69fef6fc49eda054dd3fe94853 (patch)
treeee3eba9d3f198dd30b5b914e1e89e2498cfc206e
parentwikibot-m(atf): Use getArchiveDetailsArchivebot directly (diff)
signature
wikibot-m(atf): Use our own User-Agent string
Seems silly to act as if we were Mozilla but I guess it was put there for some purpose?
-rw-r--r--wikibot-manual/archiveteamfun.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wikibot-manual/archiveteamfun.py b/wikibot-manual/archiveteamfun.py
index 36f243f..60e43f0 100644
--- a/wikibot-manual/archiveteamfun.py
+++ b/wikibot-manual/archiveteamfun.py
@@ -128,7 +128,8 @@ def getURL(url='', cache=False, retry=True):
#print("Using cached page for %s" % (url))
return ArchivebotCache[url]
raw = ''
- headers = { 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0' }
+ #headers = { 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0' }
+ headers = { 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0, ArchiveWikiListGenerator) Gecko/20100101 Firefox/55.0' }
request = urllib.request.Request(url, headers=headers)
try:
print("Retrieving: %s" % (url))