about summary refs log tree commit diff
path: root/youtube_dl/extractor/tvnoe.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-09-05 13:37:36 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-09-05 13:37:36 +0800
commit9127e1533d294eb672d783d1eeed15aeb9b2cbe1 (patch)
tree5bd1ab7808b5fa55100a53dd27cdcf0881e6902f /youtube_dl/extractor/tvnoe.py
parent78e762d23c48f85c61a8afcae29307912000a7dd (diff)
downloadyoutube-dl-9127e1533d294eb672d783d1eeed15aeb9b2cbe1.tar.gz
youtube-dl-9127e1533d294eb672d783d1eeed15aeb9b2cbe1.tar.xz
youtube-dl-9127e1533d294eb672d783d1eeed15aeb9b2cbe1.zip
[tvnoe] PEP8 and coding style
Diffstat (limited to 'youtube_dl/extractor/tvnoe.py')
-rw-r--r--youtube_dl/extractor/tvnoe.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/youtube_dl/extractor/tvnoe.py b/youtube_dl/extractor/tvnoe.py
index d50261ddd..1cd3e6a58 100644
--- a/youtube_dl/extractor/tvnoe.py
+++ b/youtube_dl/extractor/tvnoe.py
@@ -2,7 +2,11 @@
 from __future__ import unicode_literals
 
 from .jwplatform import JWPlatformBaseIE
-from ..utils import clean_html, get_element_by_class, js_to_json
+from ..utils import (
+    clean_html,
+    get_element_by_class,
+    js_to_json,
+)
 
 
 class TVNoeIE(JWPlatformBaseIE):
@@ -14,8 +18,7 @@ class TVNoeIE(JWPlatformBaseIE):
             'id': '10362',
             'ext': 'mp4',
             'series': 'Noční univerzita',
-            'title': 'prof. Tomáš Halík, Th.D. - ' +
-                     'Návrat náboženství a střet civilizací',
+            'title': 'prof. Tomáš Halík, Th.D. - Návrat náboženství a střet civilizací',
             'description': 'md5:f337bae384e1a531a52c55ebc50fff41',
         }
     }
@@ -24,21 +27,23 @@ class TVNoeIE(JWPlatformBaseIE):
         video_id = self._match_id(url)
         webpage = self._download_webpage(url, video_id)
 
-        iframe_url = self._search_regex(r'<iframe[^>]+src="([^"]+)"',
-                                        webpage, 'iframe src attribute')
+        iframe_url = self._search_regex(
+            r'<iframe[^>]+src="([^"]+)"', webpage, 'iframe URL')
 
         ifs_page = self._download_webpage(iframe_url, video_id)
-        jwplayer_data = self._parse_json(self._find_jwplayer_data(ifs_page),
-                                         video_id, transform_source=js_to_json)
+        jwplayer_data = self._parse_json(
+            self._find_jwplayer_data(ifs_page),
+            video_id, transform_source=js_to_json)
         info_dict = self._parse_jwplayer_data(
             jwplayer_data, video_id, require_title=False, base_url=iframe_url)
 
         info_dict.update({
             'id': video_id,
-            'title': clean_html(
-               get_element_by_class('field-name-field-podnazev', webpage)),
-            'description': clean_html(get_element_by_class('field-name-body',
-                                                           webpage)),
+            'title': clean_html(get_element_by_class(
+                'field-name-field-podnazev', webpage)),
+            'description': clean_html(get_element_by_class(
+                'field-name-body', webpage)),
             'series': clean_html(get_element_by_class('title', webpage))
         })
+
         return info_dict