[tudou] Fix extracion
authorDelon <liuxi326@qq.com>
Wed, 5 Aug 2015 10:22:25 +0000 (18:22 +0800)
committerSergey M․ <dstftw@gmail.com>
Wed, 5 Aug 2015 17:04:49 +0000 (23:04 +0600)
youtube_dl/extractor/tudou.py

index c89de5ba4a46bb261987d8dbee5f55b3d05492da..9b934cb57b919de2e9f176cb7994251c558efab4 100644 (file)
@@ -29,6 +29,8 @@ class TudouIE(InfoExtractor):
         }
     }]
 
+    _PLAYER_URL = 'http://js.tudouui.com/bin/lingtong/PortalPlayer_177.swf'
+       
     def _url_for_id(self, id, quality=None):
         info_url = "http://v2.tudou.com/f?id=" + str(id)
         if quality:
@@ -76,6 +78,9 @@ class TudouIE(InfoExtractor):
                 'ext': ext,
                 'title': title,
                 'thumbnail': thumbnail_url,
+                'http_headers': {
+                    'Referer': self._PLAYER_URL,
+                },
             }
             result.append(part_info)