change user agent (closes #580)
This commit is contained in:
parent
9a9b07257c
commit
18281b2013
2 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue