support URLs and IDs with '-' in

This commit is contained in:
Romain Bignon 2010-04-26 17:14:15 +02:00
commit 31863d3171
4 changed files with 4 additions and 4 deletions

View file

@ -24,7 +24,7 @@ from weboob.tools.browser import BasePage
from weboob.capabilities.video import Video
class ResultsPage(BasePage):
WATCH_RE = re.compile('/watch\?v=(\w+)')
WATCH_RE = re.compile('/watch\?v=([\w-]+)')
def iter_videos(self):
for div in self.document.getroot().cssselect("div[class^=video-entry]"):
a = div.find('a')