Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24video.net] fixed new subdmain issue #23779 #23784

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 9 additions & 19 deletions youtube_dl/extractor/twentyfourvideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TwentyFourVideoIE(InfoExtractor):
_VALID_URL = r'''(?x)
https?://
(?P<host>
(?:(?:www|porno)\.)?24video\.
(?:(?:www|porno?)\.)?24video\.
(?:net|me|xxx|sexy?|tube|adult|site|vip)
)/
(?:
Expand All @@ -28,22 +28,17 @@ class TwentyFourVideoIE(InfoExtractor):
'''

_TESTS = [{
'url': 'http://www.24video.net/video/view/1044982',
'md5': 'e09fc0901d9eaeedac872f154931deeb',
'url': 'https://porn.24video.net/video/2640421-vsya-takaya-gibkaya-i-v-masle',
'md5': 'aa15e14301d90774e6a2c2e6155c203b',
'info_dict': {
'id': '1044982',
'id': '2640421',
'ext': 'mp4',
'title': 'Эротика каменного века',
'description': 'Как смотрели порно в каменном веке.',
'thumbnail': r're:^https?://.*\.jpg$',
'uploader': 'SUPERTELO',
'duration': 31,
'timestamp': 1275937857,
'upload_date': '20100607',
'title': 'Вся такая гибкая и в масле',
'description': 'Lucy Doll вся в масле извивается, как змея, в различных позах. Красотка показывает недосягаемый уровень секса, сворачиваясь в невероятные конфигурации',
'timestamp': 1558363989,
'upload_date': '20190520',
'age_limit': 18,
'like_count': int,
'dislike_count': int,
},
}
}, {
'url': 'http://www.24video.net/player/new24_play.swf?id=1044982',
'only_matching': True,
Expand Down Expand Up @@ -83,10 +78,6 @@ def _real_extract(self, url):
r'<time[^>]+\bdatetime="([^"]+)"[^>]+itemprop="uploadDate"',
webpage, 'upload date', fatal=False))

uploader = self._html_search_regex(
r'class="video-uploaded"[^>]*>\s*<a href="/jsecUser/movies/[^"]+"[^>]*>([^<]+)</a>',
webpage, 'uploader', fatal=False)

view_count = int_or_none(self._html_search_regex(
r'<span class="video-views">(\d+) просмотр',
webpage, 'view count', fatal=False))
Expand Down Expand Up @@ -118,7 +109,6 @@ def _real_extract(self, url):
'title': title,
'description': description,
'thumbnail': thumbnail,
'uploader': uploader,
'duration': duration,
'timestamp': timestamp,
'view_count': view_count,
Expand Down