]> git.bitcoin.ninja Git - youtube-dl/commitdiff
less clunky if statement
authorfnord <fnord@fnord.mobi>
Sun, 19 Jul 2015 18:59:12 +0000 (13:59 -0500)
committerfnord <fnord@fnord.mobi>
Sun, 19 Jul 2015 18:59:12 +0000 (13:59 -0500)
youtube_dl/extractor/pbs.py

index cccff270b606bbb60b47e86d91a203da7757518c..ccbe2a9f3967a1285310c58d46619bebe18367ef 100644 (file)
@@ -249,8 +249,8 @@ class PBSIE(InfoExtractor):
 
         # video.pbs.org video.pbs.org/videoInfo/... frequently provides an obscure 'title' value, like
         # 'Full Episode', 'Episode 5', etc. prepend program->title
-        alt_title = info.get('program', {}).get('title', '')
-        if alt_title != '':
+        alt_title = info.get('program', {}).get('title')
+        if alt_title:
             info['title'] = alt_title + ' - ' + re.sub(r'^' + alt_title + '[\s\-\:]+', '', info['title'])
 
         return {