Commit 15725185 authored by Nicolas Joyard's avatar Nicolas Joyard

Fix strip laposte

parent a9ae00f9
......@@ -28,13 +28,14 @@ class LaPosteImporter(BaseImporter):
soup = BeautifulSoup(requests.get(url).content, 'html5lib')
except Exception as e:
self.error('Erreur sur %s: %s' % (url, e))
return None
ident = soup.select('td.identifiant_num')
if not len(ident):
return None
ident = ident[0]
if ident.text.startswith('Aucun '):
if ident.text.strip().startswith('Aucun '):
return None
produit = self._next_el_sibling(ident)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment