Merge branch 'radiojavan' of https://github.com/mtp1376/youtube-dl into mtp1376-radio...
[youtube-dl] / youtube_dl / extractor / theplatform.py
index 5f24189cca8e11bbdc67665e672b0ac929ebed34..0e3e627f495aa5051cb96fe05f180f9790761129 100644 (file)
@@ -71,7 +71,9 @@ class ThePlatformIE(InfoExtractor):
         if not provider_id:
             provider_id = 'dJ5BDC'
 
-        if mobj.group('config'):
+        if smuggled_data.get('force_smil_url', False):
+            smil_url = url
+        elif mobj.group('config'):
             config_url = url + '&form=json'
             config_url = config_url.replace('swf/', 'config/')
             config_url = config_url.replace('onsite/', 'onsite/config/')
@@ -90,7 +92,7 @@ class ThePlatformIE(InfoExtractor):
             error_msg = next(
                 n.attrib['abstract']
                 for n in meta.findall(_x('.//smil:ref'))
-                if n.attrib.get('title') == 'Geographic Restriction')
+                if n.attrib.get('title') == 'Geographic Restriction' or n.attrib.get('title') == 'Expired')
         except StopIteration:
             pass
         else: