From b0cbf6e81dd83f3bc5cc97f895b8524c1e7197c3 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Mon, 5 Oct 2015 04:20:14 +0200 Subject: [PATCH] [bilibili] load cookies --- src/you_get/extractors/bilibili.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/you_get/extractors/bilibili.py b/src/you_get/extractors/bilibili.py index faa628cd..3d0997d0 100644 --- a/src/you_get/extractors/bilibili.py +++ b/src/you_get/extractors/bilibili.py @@ -108,6 +108,9 @@ def bilibili_download_by_cid(cid, title, output_dir='.', merge=True, info_only=F download_urls(urls, title, type_, total_size=None, output_dir=output_dir, merge=merge) def bilibili_download(url, output_dir='.', merge=True, info_only=False, **kwargs): + opener = request.build_opener(request.HTTPCookieProcessor(cookies)) + request.install_opener(opener) + html = get_html(url) title = r1_of([r'