C
C
CleanyBoom2021-11-20 20:13:01
Python
CleanyBoom, 2021-11-20 20:13:01

Downloading videos from VK?

I'm trying to download a video from the data received from GetHistoryAttachments - this is the dictionary for each video it returns

test video
{'type': 'video', 'video': {'access_key': 'a6861619a5b2a0a327', 'can_comment': 0, 'can_edit': 1, 'can_like': 1, 'can_repost': 1, 'can_subscribe': 0, 'can_add_to_faves': 1, 'can_add': 1, 'can_attach_link': 1, 'is_private': 1, 'date': 1637427733, 'description': '', 'duration': 15, 'photo_130': 'https://i.mycdn.me/getVideoPreview?id=172824874451...', 'photo_320': 'https://i.mycdn.me/getVideoPreview?id=172824874451...', 'photo_800': 'https://i.mycdn.me/getVideoPreview?id=172824874451...', 'photo_1280': 'https://i.mycdn.me/getVideoPreview?id=172824874451...', 'first_frame_130': 'https://i.mycdn.me/getVideoPreview?id=172824874451...', 'first_frame_160': 'https://i.mycdn.me/getVideoPreview?id=172824874451...', 'first_frame_320': 'https://i.mycdn.me/getVideoPreview?id=172824874451...', 'first_frame_800': 'https://i.mycdn.me/getVideoPreview?id=172824874451...', 'first_frame_1280': 'https://i.mycdn.me/getVideoPreview?id=172824874451...', 'width': 1280, 'height': 720, 'id': 456239268, 'owner_id': 385853505, 'ov_id': '2958846078785', 'title': 'Видео от Александра Кирпичева', 'is_favorite': False, 'player': 'https://vk.com/video_ext.php?oid=385853505&id=4562...', 'processing': 1, 'added': 0, 'track_code': 'video_dd6f4674ZfZuVk5LrdfjlwXtEFrmXjSZg7QPcr8GBVUZSK9F-25n5V1ue3OY5NanMLIkbw', 'views': 1, 'likes': {'count': 0, 'user_likes': 0}, 'reposts': {'count': 0, 'wall_count': 0, 'mail_count': 0, 'user_reposted': 0}, 'files': {'mp4_240': 'https://vkvd113.mycdn.me/?expires=1637687041917&sr...', 'mp4_360': 'https://vkvd113.mycdn.me/?expires=1637687041917&sr...', 'mp4_480': 'https://vkvd113.mycdn.me/?expires=1637687041917&sr...', 'mp4_720': 'https://vkvd113.mycdn.me/?expires=1637687041917&sr...', 'hls': 'https://vkvd113.mycdn.me/video.m3u8?cmd=videoPlaye...', 'dash_uni': 'https://vkvd113.mycdn.me/?expires=1637687041917&sr...', 'dash_sep': 'https://vkvd113.mycdn.me/?expires=1637687041917&sr...', 'hls_ondemand': 'https://vkvd113.mycdn.me/expires/1637687041917/cli...', 'dash_ondemand': 'https://vkvd113.mycdn.me/expires/1637687041917/cli...', 'failover_host': 'vkvd33.mycdn.me'}, 'timeline_thumbs': {'count_per_image': 9, 'count_per_row': 3, 'count_total': 15, 'frame_height': 180, 'frame_width': 320.0, 'links': ['https://i.mycdn.me/videoPreview?id=1728248744513&t...', 'https://i.mycdn.me/videoPreview?id=1728248744513&t...'], 'is_uv': True, 'frequency': 1}, 'ads': {'slot_id': 551874, 'timeout': 1.0, 'can_play': 1, 'params': {'vk_id': 385853505, 'duration': 15, 'video_id': '385853505_456239268', 'pl': 21469, 'content_id': '1657228185478211748', 'lang': 0, 'puid1': '', 'puid2': 17, 'puid3': 1, 'puid5': 14, 'puid6': 86, 'puid7': 1, 'puid9': 0, 'puid10': 4, 'puid12': 16, 'puid13': 2, 'puid14': 4, 'puid15': 1, 'puid18': 0, 'puid21': 2, 'sign': 'b3111b950695bdfb40456c11e0cbaa44a9e5a825', 'vk_catid': 18, 'is_xz_video': 1}, 'sections': ['preroll', 'midroll', 'postroll'], 'midroll_percents': [0.25, 0.75]}}}


But, neither requests, nor youtube_dl nor urlib gave the desired result (the experiments were set on the link "player"
link
https://vk.com/video_ext.php?oid=385853505&id=4562...
)
Perhaps there is some other way to download? If I don't know how to google, please provide a link to where you can read about it

NOTE: Videos in the public domain are of little interest to me. Only what users send in HP.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Puma Thailand, 2021-11-21
@opium

So why are you trying to download the player

S
Sergey Simonov, 2021-12-30
@hologram

yt-dlp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question