add r in front of regexps
This commit is contained in:
parent
b4c672fa46
commit
8e37f7227e
2 changed files with 8 additions and 7 deletions
|
|
@ -32,10 +32,11 @@ __all__ = ['YoupornBrowser']
|
|||
|
||||
class YoupornBrowser(BaseBrowser):
|
||||
DOMAIN = 'youporn.com'
|
||||
PAGES = {'http://[w\.]*youporn\.com/?': IndexPage,
|
||||
'http://[w\.]*youporn\.com/search.*': IndexPage,
|
||||
'http://[w\.]*youporn\.com/watch/(?P<id>.+)': VideoPage,
|
||||
'http://[w\.]*youporngay\.com:80/watch/(?P<id>.+)': VideoPage,
|
||||
ENCODING = None
|
||||
PAGES = {r'http://[w\.]*youporn\.com/?': IndexPage,
|
||||
r'http://[w\.]*youporn\.com/search.*': IndexPage,
|
||||
r'http://[w\.]*youporn\.com/watch/(?P<id>.+)': VideoPage,
|
||||
r'http://[w\.]*youporngay\.com:80/watch/(?P<id>.+)': VideoPage,
|
||||
}
|
||||
|
||||
@id2url(YoupornVideo.id2url)
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ __all__ = ['YoutubeBrowser']
|
|||
|
||||
class YoutubeBrowser(BaseBrowser):
|
||||
DOMAIN = u'youtube.com'
|
||||
PAGES = {'.*youtube\.com/watch\?v=(?P<id>.+)': VideoPage,
|
||||
'.*youtube\.com/index\?ytsession=.+': ForbiddenVideoPage,
|
||||
'.*youtube\.com/verify_age\?next_url=(?P<next_url>.+)': VerifyAgePage,
|
||||
PAGES = {r'.*youtube\.com/watch\?v=(?P<id>.+)': VideoPage,
|
||||
r'.*youtube\.com/index\?ytsession=.+': ForbiddenVideoPage,
|
||||
r'.*youtube\.com/verify_age\?next_url=(?P<next_url>.+)': VerifyAgePage,
|
||||
}
|
||||
|
||||
@id2url(YoutubeVideo.id2url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue