3

I want to automatically get vk.com embed code. I've already figured out how to get part of it

http://vk.com/video_ext.php?oid=3145131&id=159485516&hash=d821df23b7dc0b54&hd=1

I've got the oid and id from the page source but the hash is being computed once i click on the video and what i want is that given a link like this http://vk.com/video56612186 i want to get the embed codes of the videos in the folder. Is this possible?

gen_Eric
  • 223,194
  • 41
  • 299
  • 337
user2327579
  • 449
  • 9
  • 24
  • I don't know what `vk.com` is, nor did I follow the link, but I'm assuming that `http://vk.com/video56612186` redirects to `http://vk.com/video_ext.php?`. You should be able to use cURL to read the `Location` header, and then get the redirected URL string. – gen_Eric Jan 10 '14 at 16:43
  • no actually http://vk.com/video56612186 contains a list of videos.Once i click on the video a screen like a pop up appears to play the video.Changes in the script i noted is that a part of code is added at the bottom at the page when i click on one video.This is what i have to get but if i get the page by curl i get a list of videos with only thumbnails and not any reference to the video.Even if i get a reference to the video the hash changes for the embed code. – user2327579 Jan 10 '14 at 16:48
  • Does vk.com have an API? – gen_Eric Jan 10 '14 at 16:54
  • Yes but i don't think it does have one for getting videos – user2327579 Jan 10 '14 at 17:01
  • necro-comment as I see, TS can use [video.get API-method](https://vk.com/dev/video.get) and get needed link from the result object **response->items[0]->player** – Wizard Feb 15 '18 at 03:01

0 Answers0