From bf76e3c3edbabdfb5b3dd36b58d6768ec6d77c40 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Fri, 8 Nov 2019 18:56:15 +0300 Subject: [PATCH] fix vk audio extraction --- feeds/modules/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds/modules/utils.py b/feeds/modules/utils.py index fb7b1a4..e0b6e8f 100644 --- a/feeds/modules/utils.py +++ b/feeds/modules/utils.py @@ -7,7 +7,7 @@ import requests def get_vk_audio(url): if 'm3u8' in url: - url = re.sub(r'/[0-9a-f]+/([0-9a-f]+)/index.m3u8', r'/\1.mp3', url) + url = re.sub(r'/[0-9a-f]+(/audios)?/([0-9a-f]+)/index.m3u8', r'\1/\2.mp3', url) return get_file(url)