mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-25 15:57:55 +01:00
Applied changes requested by maintainers.
Four changes made as requested.
This commit is contained in:
parent
dea5b2b089
commit
d3a6216e60
@ -68,22 +68,20 @@ class PornTrexIE(PornTrexBaseIE):
|
|||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'<title>(.+?)</title>', webpage, 'title',)
|
r'<title>(.+?)</title>', webpage, 'title',)
|
||||||
url2_regex = re.compile("'(https://www.porntrex.com/get_file/.*?)/'")
|
movie_urls_regex = re.compile("'(https://www.porntrex.com/get_file/.*?)/'")
|
||||||
url2 = re.findall(url2_regex, webpage)
|
movie_urls = re.findall(movie_urls_regex, webpage)
|
||||||
uploader_regex = re.compile(
|
uploader = self._search_regex(r'/members/\d+?/["\']>\s+(.+?)\s+</a>', webpage, 'new_uploader').strip()
|
||||||
r'<a href="https://www.porntrex.com/members/[0-9]+?/">(.+?)</a>',
|
|
||||||
re.DOTALL)
|
|
||||||
uploader = re.findall(uploader_regex, webpage)[0].strip()
|
|
||||||
thumbnails_regex = re.compile(r'href="(http.*?/screenshots/\d+.jpg/)"')
|
thumbnails_regex = re.compile(r'href="(http.*?/screenshots/\d+.jpg/)"')
|
||||||
thumbnails_list = re.findall(thumbnails_regex, webpage)
|
thumbnails_list = re.findall(thumbnails_regex, webpage)
|
||||||
thumbnails = []
|
thumbnails = []
|
||||||
for thumbs in thumbnails_list:
|
for thumbs in thumbnails_list:
|
||||||
thumbnails.append({'url': thumbs})
|
thumbnails.append({'url': thumbs})
|
||||||
formats = []
|
formats = []
|
||||||
for x, _ in enumerate(url2):
|
for movie_url in movie_urls:
|
||||||
formats.append({'url': url2[x],
|
formats.append({'url': movie_url,
|
||||||
'ext': url2[x].split('.')[-1],
|
'ext': movie_url.split('.')[-1],
|
||||||
'protocol': url2[x].split(':')[0],
|
'protocol': movie_url.split(':')[0],
|
||||||
|
'height': int(self._search_regex(r'_(\d+)p.', movie_url.split('/')[8], 'height', default='480')),
|
||||||
})
|
})
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
@ -94,6 +92,7 @@ class PornTrexIE(PornTrexBaseIE):
|
|||||||
'uploader': uploader,
|
'uploader': uploader,
|
||||||
'thumbnails': thumbnails,
|
'thumbnails': thumbnails,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
|
'age_limit': 18,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user