change user agent (closes #580)

This commit is contained in:
Juke 2011-03-22 07:38:01 +01:00 committed by Romain Bignon
commit 18281b2013
2 changed files with 2 additions and 0 deletions

View file

@ -123,6 +123,7 @@ class Transilien(BaseBrowser):
def __init__(self, **kwargs):
kwargs['parser'] = Parser
BaseBrowser.__init__(self, '', **kwargs)
USER_AGENT = BaseBrowser.USER_AGENTS['microb']
def iter_station_search(self, pattern):
pass

View file

@ -124,6 +124,7 @@ class BaseBrowser(mechanize.Browser):
USER_AGENTS = {
'desktop_firefox': 'Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.2.13) Gecko/20101209 Fedora/3.6.13-1.fc13 Firefox/3.6.13',
'android': 'Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17',
'microb': 'Mozilla/5.0 (X11; U; Linux armv7l; fr-FR; rv:1.9.2.3pre) Gecko/20100723 Firefox/3.5 Maemo Browser 1.7.4.8 RX-51 N900',
'wget': 'Wget/1.11.4',
}
USER_AGENT = USER_AGENTS['desktop_firefox']