Bug #1447

arretsurimages module : BrokenPageError: Not enough elements found (1 expected) with selector "a.typo-titre"

Added by Loïc Bontonou over 3 years ago. Updated almost 3 years ago.

Status:Resolved Start:2014-08-17
Priority:High Due date:
Assigned to:- % Done:

100%

Category:Modules Spent time: -
Target version:1.1
Module:arretsurimages Branch:

Description

Le module arretsurimages plante dès le premier ls depuis fin juillet, l'erreur remontée est la suivante :

BrokenPageError: Not enough elements found (1 expected) with selector "a.typo-titre" 

Je suis en weboob 0.i, modules à jour :

$ weboob-config update
=== [  0%] Getting http://updates.weboob.org/0.i/main/
=== [ 43%] The latest version of arretsurimages is already installed

Ci-dessous une séquence de commandes permettant de reproduire l'erreur, avec les logs activés :

$ videoob 
Welcome to videoob v0.i
(...)
Loaded backends: arretsurimages, arte, canalplus, francetelevisions, youtube

videoob> backends only arretsurimages 
videoob> ls
~ (latest) Latest ArretSurImages videos (arretsurimages)
videoob> logging debug 
videoob> cd latest 
videoob:/latest> ls
2014-08-17 14:03:15,789:DEBUG:bcall:0.i:bcall.py:78:backend_process <Backend 'arretsurimages'>: Calling function <bound method Videoob._do_complete of <weboob.applications.videoob.videoob.Videoob object at 0xb657c54c>>
2014-08-17 14:03:15,789:DEBUG:bcall:0.i:bcall.py:87:backend_process <Backend 'arretsurimages'>: Called function <bound method Videoob._do_complete of <weboob.applications.videoob.videoob.Videoob object at 0xb657c54c>> returned: <generator object _do_complete_iter at 0xb6176fcc>
2014-08-17 14:03:15,972:WARNING:backend.arretsurimages.browser:0.i:browser.py:670:_change_location There isn't any page corresponding to URL http://www.arretsurimages.net
Debug data will be saved in this directory: /tmp/weboob_session_tE1yDW
2014-08-17 14:03:16,099:WARNING:backend.arretsurimages.browser:0.i:browser.py:318:save_response Response saved to /tmp/weboob_session_tE1yDW/0.html
2014-08-17 14:03:16,312:DEBUG:backend.arretsurimages.browser:0.i:browser.py:674:_change_location [user_id=loic.bontonou@laposte.net] Went on http://www.arretsurimages.net/emissions.php
Bug(arretsurimages): Not enough elements found (1 expected) with selector "a.typo-titre" 
=== [  0%] Getting http://updates.weboob.org/0.i/main/
2014-08-17 14:03:16,513:INFO:requests.packages.urllib3.connectionpool:0.i:connectionpool.py:257:_new_conn Starting new HTTP connection (1): updates.weboob.org
2014-08-17 14:03:16,592:DEBUG:requests.packages.urllib3.connectionpool:0.i:connectionpool.py:374:_make_request Setting read timeout to 10.0
2014-08-17 14:03:16,638:DEBUG:requests.packages.urllib3.connectionpool:0.i:connectionpool.py:414:_make_request "GET /0.i/main/modules.list HTTP/1.1" 200 32824
Traceback (most recent call last):
  File "/home/loboto/.local/lib/python2.7/site-packages/weboob-0.i-py2.7.egg/weboob/core/bcall.py", line 92, in backend_process
    for subresult in result:
  File "/home/loboto/.local/lib/python2.7/site-packages/weboob-0.i-py2.7.egg/weboob/tools/application/base.py", line 264, in _do_complete_iter
    for i, sub in enumerate(res):
  File "/home/loboto/.local/share/weboob/modules/0.i/arretsurimages/backend.py", line 74, in iter_resources
    for video in self.browser.latest_videos():
  File "/home/loboto/.local/share/weboob/modules/0.i/arretsurimages/pages.py", line 37, in iter_videos
    title = self.parser.select(div, 'a.typo-titre', 1).text_content().replace('  ', ' ')
  File "/home/loboto/.local/lib/python2.7/site-packages/weboob-0.i-py2.7.egg/weboob/tools/parsers/lxmlparser.py", line 99, in select
    raise BrokenPageError('Not enough elements found (%d expected) with selector "%s"' % (nb, selector))
BrokenPageErroravec le message d'erreur : Not enough elements found (1 expected) with selector "a.typo-titre" 

Associated revisions

Revision bd1688d72ff26c7d9e5133857f7235a0ebe4bd0c
Added by Loic Bontonou about 3 years ago

Fix #1447 : Get videos titles in h1

Signed-off-by: Loic Bontonou <>

History

Updated by Anonymous about 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Updated by Romain Bignon almost 3 years ago

  • Target version set to 1.1

Also available in: Atom PDF