Skip to content

Commit bd6e0ca

Browse files
author
GitBib
authored
fix search_user
1 parent af94a79 commit bd6e0ca

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

vk_api/audio.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
from bs4 import BeautifulSoup
3-
3+
import re
44
from .exceptions import AccessDenied
55

66

@@ -56,8 +56,11 @@ def search_user(self, owner_id, q='', offset=0):
5656
owner_id
5757
)
5858
)
59+
60+
if re.search(r'audio\d+_\d+_audios\d+', response.text):
61+
return [data for data in scrap_data(response.text) if not re.search(r'audio\d+_\d+_search\d+', data['id'])]
5962

60-
return scrap_data(response.text)
63+
return []
6164

6265
def search(self, q='', offset=0):
6366
""" Поиск аудиозаписей

0 commit comments

Comments
 (0)