Posted By

rowntreerob on 05/01/09


Tagged

YouTube


Versions (?)

youtube - call 1 get token for video


 / Published in: Bash
 

first call gets token, second call uses token for the actual media

  1. $ wget --user-agent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322; InfoPath.2)" -
  2. d -Outub_2.xml "http://www.youtube.com/get_video_info?&video_id=VFGVzt7c5bY"
  3.  
  4. Setting --output-document (outputdocument) to utub_2.xml
  5. DEBUG output created by Wget 1.11.3 on cygwin.
  6.  
  7. --2009-05-01 14:38:48-- http://www.youtube.com/get_video_info?&video_id=VFGVzt7c5bY
  8. Resolving www.youtube.com... 208.117.236.76
  9. Caching www.youtube.com => 208.117.236.76
  10. Connecting to www.youtube.com|208.117.236.76|:80... connected.
  11. Created socket 4.
  12. Releasing 0x00f80f88 (new refcount 1).
  13.  
  14. ---request begin---
  15. GET /get_video_info?&video_id=VFGVzt7c5bY HTTP/1.0
  16. User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322; InfoPath.2)
  17. Accept: */*
  18. Host: www.youtube.com
  19. Connection: Keep-Alive
  20.  
  21. ---request end---
  22. HTTP request sent, awaiting response...
  23. ---response begin---
  24. HTTP/1.1 200 OK
  25. Date: Fri, 01 May 2009 21:38:49 GMT
  26. Server: Apache
  27. X-Content-Type-Options: nosniff
  28. Expires: Tue, 27 Apr 1971 19:44:06 EST
  29. X-YouTube-MID: WkFSZzctYUFHdmhPdXRNV25jS3JEb3NiS0JUbGhDZkR4aFJ5TXdYRFhaSW5QUklVRlNJN0ln
  30. Cache-Control: no-cache
  31. Content-Length: 504
  32. Keep-Alive: timeout=300
  33. Connection: Keep-Alive
  34. Content-Type: application/x-www-form-urlencoded
  35.  
  36. ---response end---
  37. 200 OK
  38. Registered socket 4 for persistent reuse.
  39. Length: 504 [application/x-www-form-urlencoded]
  40. Saving to: `utub_2.xml'
  41.  
  42. 100%[======================================================================================================================>] 504 --.-K/s in 0s
  43.  
  44. OUTPUT:
  45.  
  46. status=ok&author=macattck2533&title=Giant LEGO Boulder&muted=0&avg_rating=4.74888211382&video_id=VFGVzt7c5bY&length_seconds=89&vq=None&fmt_map=18/512000/9/0/115,34/0/9/0/115,5/0/7/0/0&token=vjVQa1PpcFO20YfQf-PC05xUFqFMJw-RffWDaQVHL1U=&thumbnail_url=http://i3.ytimg.com/vi/VFGVzt7c5bY/default.jpg&allow_ratings=1&plid=AARo4KNb6AegVoTO&keywords=LEGO,Boulder,Ball,LEGOS,Indiana,Jones,Indy,San,Francisco,Hill,Million,Funny&ftoken=&track_embed=0

Report this snippet  

You need to login to post a comment.