From ccd7368acfe60661be1048804505fe0872f4d019 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Wed, 6 May 2020 18:54:19 +0300 Subject: [PATCH] remove vk audio --- feeds/modules/vk_feed.py | 8 ++++---- feeds/modules/vk_music.py | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/feeds/modules/vk_feed.py b/feeds/modules/vk_feed.py index 5ab2895..14f112d 100644 --- a/feeds/modules/vk_feed.py +++ b/feeds/modules/vk_feed.py @@ -45,10 +45,10 @@ class VKFeedModuleConfig(FeedModuleConfig): bot.send_photo(chat_id, photos[0]) elif len(photos) > 1: bot.send_media_group(chat_id, [InputMediaPhoto(photo) for photo in photos]) - for a in post['attachments']: - if 'audio' in a: - f = get_vk_audio(vk_audio.get_audio_by_id(a['audio']['owner_id'], a['audio']['id'])) - bot.send_audio(chat_id, f, None, a['audio'].get('artist'), a['audio'].get('title')) + # for a in post['attachments']: + # if 'audio' in a: + # f = get_vk_audio(vk_audio.get_audio_by_id(a['audio']['owner_id'], a['audio']['id'])) + # bot.send_audio(chat_id, f, None, a['audio'].get('artist'), a['audio'].get('title')) if self.send_links: bot.send_message(chat_id, f"https://vk.com/wall{post['owner_id']}_{post['id']}", disable_web_page_preview=True) diff --git a/feeds/modules/vk_music.py b/feeds/modules/vk_music.py index 74410c5..1a847ac 100644 --- a/feeds/modules/vk_music.py +++ b/feeds/modules/vk_music.py @@ -27,6 +27,8 @@ class VKMusicFeedModuleConfig(FeedModuleConfig): if last_id is None: last_id = 0 + raise StopIteration() + vk_session = VkApi(login=config.vk_username, password=config.vk_password, config=DatabaseConfig, api_version='5.60', captcha_handler=captcha_handler) if config.russian_proxy_string: