From c9ffae970e3ebc6131c4b4a6593320ab6fe65675 Mon Sep 17 00:00:00 2001 From: Vicent Tsai Date: Mon, 10 Oct 2016 00:13:01 +0800 Subject: [PATCH] [AcFun] fix #1429 --- src/you_get/extractors/acfun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/you_get/extractors/acfun.py b/src/you_get/extractors/acfun.py index 4638cb8f..87e005fb 100644 --- a/src/you_get/extractors/acfun.py +++ b/src/you_get/extractors/acfun.py @@ -73,14 +73,14 @@ def acfun_download(url, output_dir='.', merge=True, info_only=False, **kwargs): assert re.match(r'http://[^\.]+.acfun.[^\.]+/\D/\D\D(\d+)', url) html = get_html(url) - title = r1(r'

([^<>]+)<', html) + title = r1(r'data-title="([^"]+)"', html) title = unescape_html(title) title = escape_file_path(title) assert title - video = re.search('data-vid="(\d+)"\s*data-scode=""[^<]*title="([^"]+)"', html) - vid = video.group(1) - title = title + ' - ' + video.group(2) + vid = r1('data-vid="(\d+)"', html) + up = r1('data-name="([^"]+)"', html) + title = title + ' - ' + up acfun_download_by_vid(vid, title, output_dir=output_dir, merge=merge,