[weboob] [PATCH 1/1] seloger: Fix pagination

Simon Lipp laiquo at hwold.net
Tue Jan 3 16:02:47 CET 2017


Right now webservices of seloger.com have a bug and returns an
invalid URL for next page (http://ws.seloger.com/http://ws.seloger.com/search.xml).

Work around that by deleting everyting before the last "http://" in the
URL.

Signed-off-by: Simon Lipp <laiquo at hwold.net>
---
 modules/seloger/pages.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/seloger/pages.py b/modules/seloger/pages.py
index 8d6a58ef0..da5dbfd9f 100644
--- a/modules/seloger/pages.py
+++ b/modules/seloger/pages.py
@@ -67,7 +67,7 @@ class SearchResultsPage(XMLPage):
         item_xpath = "//annonce"
 
         def next_page(self):
-            page = CleanText('//pageSuivante', default=None)(self)
+            page = CleanText('//pageSuivante', default=None, replace=[('http://ws.seloger.com/', '')])(self)
             if page:
                 return page
 
-- 
2.11.0




More information about the weboob mailing list