1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-14 11:12:51 +08:00

test_download works for photobucket after this change (cherry picked from commit 8d5cb73)

This commit is contained in:
codesparkle 2014-05-17 12:18:16 +10:00
commit c38bed3676
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ import json
import re import re
from .common import InfoExtractor from .common import InfoExtractor
from utils import compat_urllib_parse from ..utils import compat_urllib_parse
class PhotobucketIE(InfoExtractor): class PhotobucketIE(InfoExtractor):
@ -33,7 +33,7 @@ class PhotobucketIE(InfoExtractor):
info_json = self._search_regex(r'Pb\.Data\.Shared\.put\(Pb\.Data\.Shared\.MEDIA, (.*?)\);', info_json = self._search_regex(r'Pb\.Data\.Shared\.put\(Pb\.Data\.Shared\.MEDIA, (.*?)\);',
webpage, 'info json') webpage, 'info json')
info = json.loads(info_json) info = json.loads(info_json)
url = compat_urllib_parse.unquote(self._html_search_regex('file=(.+\.mp4)', info['linkcodes']['html'], 'url')) url = compat_urllib_parse.unquote(self._html_search_regex(r'file=(.+\.mp4)', info['linkcodes']['html'], 'url'))
return { return {
'id': video_id, 'id': video_id,
'url': url, 'url': url,

View File

@ -1140,7 +1140,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
mobj = re.search(r'(?s)id="eow-date.*?>(.*?)</span>', video_webpage) mobj = re.search(r'(?s)id="eow-date.*?>(.*?)</span>', video_webpage)
if mobj is None: if mobj is None:
mobj = re.search( mobj = re.search(
r'(?s)id="watch-uploader-info".*?>.*?Published on (.*?)</strong>', r'(?s)id="watch-uploader-info".*?>.*?(?:Published|Uploaded) on (.*?)</strong>',
video_webpage) video_webpage)
if mobj is not None: if mobj is not None:
upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split()) upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split())

View File

@ -1,2 +1,2 @@
__version__ = '2014.05.16.1' __version__ = '2014.05.17'