From feecf2251190ef7969ba58146f058e87fa237abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Thu, 2 May 2013 13:39:56 +0200 Subject: [PATCH] InfoExtractors: fix some regular expressions where dots weren't escaped --- youtube_dl/InfoExtractors.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 7dfd0c5c7..1f66cc5a5 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -3554,7 +3554,7 @@ class FunnyOrDieIE(InfoExtractor): return [info] class SteamIE(InfoExtractor): - _VALID_URL = r"""http://store.steampowered.com/ + _VALID_URL = r"""http://store\.steampowered\.com/ (agecheck/)? (?Pvideo|app)/ #If the page is only for videos or for a game (?P\d+)/? @@ -3988,7 +3988,7 @@ class KeekIE(InfoExtractor): return [info] class TEDIE(InfoExtractor): - _VALID_URL=r'''http://www.ted.com/ + _VALID_URL=r'''http://www\.ted\.com/ ( ((?Pplaylists)/(?P\d+)) # We have a playlist | @@ -4244,7 +4244,7 @@ class ARDIE(InfoExtractor): return [info] class TumblrIE(InfoExtractor): - _VALID_URL = r'http://(?P.*?).tumblr.com/((post)|(video))/(?P\d*)/(.*?)' + _VALID_URL = r'http://(?P.*?)\.tumblr\.com/((post)|(video))/(?P\d*)/(.*?)' def _real_extract(self, url): m_url = re.match(self._VALID_URL, url) @@ -4254,7 +4254,7 @@ class TumblrIE(InfoExtractor): url = 'http://%s.tumblr.com/post/%s/' % (blog, video_id) webpage = self._download_webpage(url, video_id) - re_video = r'src=\\x22(?Phttp://%s.tumblr.com/video_file/%s/(.*?))\\x22 type=\\x22video/(?P.*?)\\x22' % (blog, video_id) + re_video = r'src=\\x22(?Phttp://%s\.tumblr\.com/video_file/%s/(.*?))\\x22 type=\\x22video/(?P.*?)\\x22' % (blog, video_id) video = re.search(re_video, webpage) if video is None: self.to_screen("No video founded") @@ -4278,7 +4278,7 @@ class TumblrIE(InfoExtractor): }] class BandcampIE(InfoExtractor): - _VALID_URL = r'http://.*?.bandcamp.com/track/(?P.*)' + _VALID_URL = r'http://.*?\.bandcamp\.com/track/(?P<title>.*)' def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) @@ -4303,7 +4303,7 @@ class BandcampIE(InfoExtractor): mp3_info = info[u'downloads'][u'mp3-320'] # If we try to use this url it says the link has expired initial_url = mp3_info[u'url'] - re_url = r'(?P<server>http://(.*?).bandcamp.com)/download/track\?enc=mp3-320&fsig=(?P<fsig>.*?)&id=(?P<id>.*?)&ts=(?P<ts>.*)$' + re_url = r'(?P<server>http://(.*?)\.bandcamp\.com)/download/track\?enc=mp3-320&fsig=(?P<fsig>.*?)&id=(?P<id>.*?)&ts=(?P<ts>.*)$' m_url = re.match(re_url, initial_url) #We build the url we will use to get the final track url # This url is build in Bandcamp in the script download_bunde_*.js