X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/b8d8e13c1f9e4d3cdd7d41c5c9d711a36dd5f9c3..f8df414a4abcde0ddd39325dac26ca071d2d15c6:/youtube_dl/extractor/bilibili.py diff --git a/youtube_dl/extractor/bilibili.py b/youtube_dl/extractor/bilibili.py index 80dd838..1e57310 100644 --- a/youtube_dl/extractor/bilibili.py +++ b/youtube_dl/extractor/bilibili.py @@ -54,6 +54,22 @@ class BiliBiliIE(InfoExtractor): 'description': 'å¦æä½ æ¯ç¥æï¼å¹¶ä¸è½å¤è®©å¦æ³æ为ç°å®ãé£ä½ ä¼è¿è¡æä¹æ ·çå¦æ³ï¼æ¯æ·«é¡çä¸çï¼ç¬è£ç¤¾ä¼ï¼æ¯çæ§çå¶è£ï¼è¿æ¯â¦â¦2015å¹´ï¼æ¶©è°·ãä»6å¹´ååçç大ç¾å®³â涩谷å°éâä¹åå¤å ´äºçè¿ä¸ªè¡åºéæ°è®¾ç«çç§ç«é«ä¸...', }, 'skip': 'Geo-restricted to China', + }, { + # Title with double quotes + 'url': 'http://www.bilibili.com/video/av8903802/', + 'info_dict': { + 'id': '8903802', + 'ext': 'mp4', + 'title': 'é¿æ»´è±æï½è±ææå享#6 "Closer', + 'description': '滴妹ä»å¤©å±Closerçµ¦ä½ è½! æå²ä»¥æ¥ï¼è¢«æ¨æå¤æ¬¡ä¹æ¯æä¹ çææ²ï¼å ¶å®æè¯è·æåæ¬æ³åå·®è®å¤çï¼ä¸è¿è¿æ¯å¥½å¬ï¼ å¾®å@é¿æ»´è±æ', + 'uploader': 'é¿æ»´è±æ', + 'uploader_id': '65880958', + 'timestamp': 1488382620, + 'upload_date': '20170301', + }, + 'params': { + 'skip_download': True, # Test metadata only + }, }] _APP_KEY = '84956560bc028eb7' @@ -122,6 +138,11 @@ class BiliBiliIE(InfoExtractor): 'preference': -2 if 'hd.mp4' in backup_url else -3, }) + for a_format in formats: + a_format.setdefault('http_headers', {}).update({ + 'Referer': url, + }) + self._sort_formats(formats) entries.append({ @@ -130,7 +151,7 @@ class BiliBiliIE(InfoExtractor): 'formats': formats, }) - title = self._html_search_regex('