diff options
Diffstat (limited to 'youtube_dl')
-rwxr-xr-x | youtube_dl/InfoExtractors.py | 4 | ||||
-rw-r--r-- | youtube_dl/utils.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 3eb070d4a..5a9032331 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -1018,9 +1018,9 @@ class VimeoIE(InfoExtractor): # Extract upload date video_upload_date = None - mobj = re.search(r'<span id="clip-date" style="display:none">[^:]*: (.*?)( \([^\(]*\))?</span>', webpage) + mobj = re.search(r'<meta itemprop="dateCreated" content="(\d{4})-(\d{2})-(\d{2})T', webpage) if mobj is not None: - video_upload_date = mobj.group(1) + video_upload_date = mobj.group(1) + mobj.group(2) + mobj.group(3) # Vimeo specific: extract request signature and timestamp sig = config['request']['signature'] diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index c18c9beed..463804e18 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -298,7 +298,8 @@ def clean_html(html): """Clean an HTML snippet into a readable string""" # Newline vs <br /> html = html.replace('\n', ' ') - html = re.sub('\s*<\s*br\s*/?\s*>\s*', '\n', html) + html = re.sub(r'\s*<\s*br\s*/?\s*>\s*', '\n', html) + html = re.sub(r'<\s*/\s*p\s*>\s*<\s*p[^>]*>', '\n', html) # Strip html tags html = re.sub('<.*?>', '', html) # Replace html entities |