X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=inline;f=youtube_dl%2Fextractor%2Fxhamster.py;h=981ee284f78d1fcf4f7ed605604f8d5199dfe289;hb=bcac2a071040fd89585a806ca66e086c109406c1;hp=560c38e269c7f7eed8ed01f8ac2e66d032f68240;hpb=4763b624a6655bc2333157031c73858f6b918f61;p=youtube-dl
diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py
index 560c38e26..981ee284f 100644
--- a/youtube_dl/extractor/xhamster.py
+++ b/youtube_dl/extractor/xhamster.py
@@ -4,10 +4,10 @@ import re
from .common import InfoExtractor
from ..utils import (
- unified_strdate,
- str_to_int,
+ float_or_none,
int_or_none,
- parse_duration,
+ str_to_int,
+ unified_strdate,
)
@@ -64,9 +64,10 @@ class XHamsterIE(InfoExtractor):
webpage = self._download_webpage(mrss_url, video_id)
title = self._html_search_regex(
- [r'
]*>(.+?)(?:,\s*[^,]*?\s*Porn\s*[^,]*?:\s*xHamster[^<]*| - xHamster\.com)',
- r']*>([^<]+)
',
- r']+itemprop=".*?caption.*?"[^>]+content="(.+?)"'], webpage, 'title')
+ [r']*>([^<]+)
',
+ r']+itemprop=".*?caption.*?"[^>]+content="(.+?)"',
+ r']*>(.+?)(?:,\s*[^,]*?\s*Porn\s*[^,]*?:\s*xHamster[^<]*| - xHamster\.com)'],
+ webpage, 'title')
# Only a few videos have an description
mobj = re.search(r'Description: ([^<]+)', webpage)
@@ -77,7 +78,7 @@ class XHamsterIE(InfoExtractor):
webpage, 'upload date', fatal=False))
uploader = self._html_search_regex(
- r"]+>(?P[^<]+)",
+ r']+itemprop=["\']author[^>]+>]+href=["\'].+?xhamster\.com/user/[^>]+>(?P.+?)',
webpage, 'uploader', default='anonymous')
thumbnail = self._search_regex(
@@ -85,12 +86,13 @@ class XHamsterIE(InfoExtractor):
r'''