From 54db14c4eaea8caf8e43d67b12691bcd759516c3 Mon Sep 17 00:00:00 2001 From: nindogo Date: Wed, 15 May 2019 01:35:21 +0300 Subject: [PATCH] Small changes done to make things cleaner. Hopefully also make things pythonic. --- youtube_dl/extractor/porntrex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/porntrex.py b/youtube_dl/extractor/porntrex.py index 7e159a2c7..f3788526e 100644 --- a/youtube_dl/extractor/porntrex.py +++ b/youtube_dl/extractor/porntrex.py @@ -81,7 +81,7 @@ class PornTrexIE(PornTrexBaseIE): formats.append({'url': movie_url, 'ext': movie_url.split('.')[-1], 'protocol': movie_url.split(':')[0], - 'height': int(self._search_regex(r'_(\d+)p.', movie_url.split('/')[8], 'height', default='480')), + 'height': int(self._search_regex(r'_(\d+)p.', movie_url.split('/')[-1], 'height', default='480')), }) self._sort_formats(formats) @@ -129,7 +129,7 @@ class PornTrexPlayListIE(PornTrexBaseIE): return { '_type': 'playlist', - 'id': url.split('/')[4], + 'id': playlist_id, 'title': self._html_search_regex( r'(.+?)', webpage,