Skip to content

Получение аудиозаписей из поста пользователя или сообщества#323

Merged
python273 merged 5 commits intopython273:masterfrom
qwertyadrian:master
Jan 4, 2020
Merged

Получение аудиозаписей из поста пользователя или сообщества#323
python273 merged 5 commits intopython273:masterfrom
qwertyadrian:master

Conversation

@qwertyadrian
Copy link
Copy Markdown
Contributor

Подробнее в #157

Comment thread vk_api/audio.py Outdated
link = bs.select_one('.ai_body input[type=hidden]').attrs['value']
return decode_audio_url(link, self.user_id)

def get_wall_audio(self, owner_id, wall_id):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ну post тут больше подходит, wall это если бы со стены

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тогда я верну прежнее имя метода:

Suggested change
def get_wall_audio(self, owner_id, wall_id):
def get_post_audio(self, owner_id, post_id):

Comment thread vk_api/vk_api.py Outdated
Comment on lines +114 to +116
self.http.cookies.update({
'remixmdevice': '1920/1080/1/!!-!!!!'
})
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Видимо оно не работает если: нет сохраненных кук, вызывается auth, получены новые куки, вызывается get_wall_audio. Думаю стоит в VkAudio копировать сессию и там ставить куки

Copy link
Copy Markdown
Contributor Author

@qwertyadrian qwertyadrian Dec 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я думаю тогда вставку куки в VkAudio.__init__ делать.

Moved cookie insert from VkApi.__init__ in VkAudio.__init__
@python273 python273 merged commit 7005df7 into python273:master Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants