use an android useragent
This commit is contained in:
parent
f439141f90
commit
7f01e431a6
1 changed files with 3 additions and 2 deletions
|
|
@ -32,10 +32,11 @@ class SeLogerBrowser(BaseBrowser):
|
||||||
PROTOCOL = 'http'
|
PROTOCOL = 'http'
|
||||||
DOMAIN = 'www.seloger.com'
|
DOMAIN = 'www.seloger.com'
|
||||||
ENCODING = 'utf-8'
|
ENCODING = 'utf-8'
|
||||||
|
USER_AGENT = BaseBrowser.USER_AGENTS['android']
|
||||||
PAGES = {
|
PAGES = {
|
||||||
'http://www.seloger.com/(pre)?recherche.htm.*': SearchResultsPage,
|
'http://www.seloger.com/(pre)?recherche.htm.*': SearchResultsPage,
|
||||||
'http://www.seloger.com/annonces.htm.*': SearchResultsPage,
|
'http://www.seloger.com/annonces.htm.*': SearchResultsPage,
|
||||||
'http://ws.seloger.com/annonceDetail.xml\?idAnnonce=(\d+)': HousingPage,
|
'http://ws.seloger.com/annonceDetail.xml\?idAnnonce=(\d+)(&noAudiotel=\d)?': HousingPage,
|
||||||
}
|
}
|
||||||
|
|
||||||
def search_geo(self, pattern):
|
def search_geo(self, pattern):
|
||||||
|
|
@ -59,7 +60,7 @@ class SeLogerBrowser(BaseBrowser):
|
||||||
return self.page.iter_housings()
|
return self.page.iter_housings()
|
||||||
|
|
||||||
def get_housing(self, id, obj=None):
|
def get_housing(self, id, obj=None):
|
||||||
self.location(self.buildurl('http://ws.seloger.com/annonceDetail.xml', idAnnonce=id))
|
self.location(self.buildurl('http://ws.seloger.com/annonceDetail.xml', idAnnonce=id, noAudiotel=1))
|
||||||
|
|
||||||
assert self.is_on_page(HousingPage)
|
assert self.is_on_page(HousingPage)
|
||||||
housing = self.page.get_housing(obj)
|
housing = self.page.get_housing(obj)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue