Fix getting latest dailymotion videos
This commit is contained in:
parent
9a5a80f21a
commit
ea0af7b6a1
1 changed files with 5 additions and 1 deletions
|
|
@ -32,7 +32,8 @@ __all__ = ['DailymotionBrowser']
|
|||
class DailymotionBrowser(BaseBrowser):
|
||||
DOMAIN = 'dailymotion.com'
|
||||
ENCODING = None
|
||||
PAGES = {r'http://[w\.]*dailymotion\.com/?': IndexPage,
|
||||
PAGES = {r'http://[w\.]*dailymotion\.com/1': IndexPage,
|
||||
r'http://[w\.]*dailymotion\.com/[a-z\-]{2,5}/1': IndexPage,
|
||||
r'http://[w\.]*dailymotion\.com/(\w+/)?search/.*': IndexPage,
|
||||
r'http://[w\.]*dailymotion\.com/video/(?P<id>.+)': VideoPage,
|
||||
}
|
||||
|
|
@ -42,6 +43,9 @@ class DailymotionBrowser(BaseBrowser):
|
|||
self.location(url)
|
||||
return self.page.get_video(video)
|
||||
|
||||
def home(self):
|
||||
self.location('/1')
|
||||
|
||||
def search_videos(self, pattern, sortby):
|
||||
if not pattern:
|
||||
self.home()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue