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):
|
class YoupornBrowser(BaseBrowser):
|
||||||
DOMAIN = 'youporn.com'
|
DOMAIN = 'youporn.com'
|
||||||
PAGES = {'http://[w\.]*youporn\.com/?': IndexPage,
|
ENCODING = None
|
||||||
'http://[w\.]*youporn\.com/search.*': IndexPage,
|
PAGES = {r'http://[w\.]*youporn\.com/?': IndexPage,
|
||||||
'http://[w\.]*youporn\.com/watch/(?P<id>.+)': VideoPage,
|
r'http://[w\.]*youporn\.com/search.*': IndexPage,
|
||||||
'http://[w\.]*youporngay\.com:80/watch/(?P<id>.+)': VideoPage,
|
r'http://[w\.]*youporn\.com/watch/(?P<id>.+)': VideoPage,
|
||||||
|
r'http://[w\.]*youporngay\.com:80/watch/(?P<id>.+)': VideoPage,
|
||||||
}
|
}
|
||||||
|
|
||||||
@id2url(YoupornVideo.id2url)
|
@id2url(YoupornVideo.id2url)
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,9 @@ __all__ = ['YoutubeBrowser']
|
||||||
|
|
||||||
class YoutubeBrowser(BaseBrowser):
|
class YoutubeBrowser(BaseBrowser):
|
||||||
DOMAIN = u'youtube.com'
|
DOMAIN = u'youtube.com'
|
||||||
PAGES = {'.*youtube\.com/watch\?v=(?P<id>.+)': VideoPage,
|
PAGES = {r'.*youtube\.com/watch\?v=(?P<id>.+)': VideoPage,
|
||||||
'.*youtube\.com/index\?ytsession=.+': ForbiddenVideoPage,
|
r'.*youtube\.com/index\?ytsession=.+': ForbiddenVideoPage,
|
||||||
'.*youtube\.com/verify_age\?next_url=(?P<next_url>.+)': VerifyAgePage,
|
r'.*youtube\.com/verify_age\?next_url=(?P<next_url>.+)': VerifyAgePage,
|
||||||
}
|
}
|
||||||
|
|
||||||
@id2url(YoutubeVideo.id2url)
|
@id2url(YoutubeVideo.id2url)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue