1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

using global uniq USER_AGENT

This commit is contained in:
urlbot
2015-08-21 23:35:28 +02:00
parent 67642cba17
commit 5f27fea8fc
3 changed files with 5 additions and 4 deletions

View File

@@ -881,7 +881,7 @@ def command_dsa_watcher(argv, **args):
try:
request = urllib.request.Request(url)
request.add_header('User-Agent', '''Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.0''')
request.add_header('User-Agent', USER_AGENT)
response = urllib.request.urlopen(request)
html_text = response.read(BUFSIZ) # ignore more than BUFSIZ
except Exception as e: