Enigma2 plugin to to play various online streams (mostly Latvian).

viaplay_api.txt 3.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. ===== Caur bowseri ===
  2. === Dabū sesija cookie PLAY_SESSION ====
  3. GET https://viaplay.lv/ HTTP/1.1
  4. Host: viaplay.lv
  5. User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
  6. === Logins (crfTokens no PLAY_SESSION)====
  7. POST https://viaplay.lv/login/nav/formular?csrfToken=ab82697da69230d680d538aac761c361af2a5a88-1477816869371-cbb508603bd482600f18a0c1 HTTP/1.1
  8. Host: viaplay.lv
  9. User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
  10. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  11. Accept-Language: en-US,en;q=0.5
  12. Accept-Encoding: gzip, deflate, br
  13. Referer: https://viaplay.lv/
  14. Cookie: PLAY_SESSION=8200d49409c84830221e51436e2ce8791052f903-PSESSIONID=46704190-64e0-4727-9ddc-293119d3b061&csrfToken=ab82697da69230d680d538aac761c361af2a5a88-1477816869371-cbb508603bd482600f18a0c1; _ga=GA1.2.1891746898.1477816871; _dc_gtm_UA-81059701-1=1; _hjIncludedInSample=1; mobileAppPromo=shown; ott_cookies_confirmed=1
  15. DNT: 1
  16. Connection: keep-alive
  17. Upgrade-Insecure-Requests: 1
  18. Content-Type: application/x-www-form-urlencoded
  19. Content-Length: 69
  20. nav_redirectUri=&nav_email=ivars777%40gmail.com&nav_password=kaskade7
  21. === Dabū strīmu info (vajag PLAY_SESSION un productId) ===
  22. GET https://viaplay.lv/prehravac/init?_infuse=1&productId=t7588 HTTP/1.1
  23. User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36
  24. Cookie: PLAY_SESSION=dc51de97336c7100e1cda971027ec159ca9c24a3-PSESSIONID=19ff5501-5d40-473d-88a3-fbe1781e0d16&csrfToken=a29e5882d948c3e4a5e745ce8ee024619950c390-1477750987235-84f31323a6f3861c91085404;
  25. Host: viaplay.lv
  26. tracks: {
  27. HLS: [
  28. {
  29. lang: 'en',
  30. src: 'https://vod-prep-sec.viaplay.cdn.cra.cz/vod_Balt/_definst_/0023/2816/eng-ao-sd1-sd2-sd3-sd4-ESFZVT6c.smil/playlist.m3u8?etime=1477824920&qs=1&ttl=10800&token=0d71b8ddf7284414e32f5',
  31. type: 'application/x-mpegURL','profiles': ['ao', 'sd1', 'sd2', 'sd3', 'sd4'],
  32. withCredentials: true
  33. },
  34. ],
  35. !!!csrfToken= dabū no PLAY_SESSION
  36. === LS links
  37. GET https://vod-prep-sec.viaplay.cdn.cra.cz/vod_Balt/_definst_/0023/2816/eng-ao-sd1-sd2-sd3-sd4-ESFZVT6c.smil/playlist.m3u8?etime=1477824920&qs=1&ttl=10800&token=0d71b8ddf7284414e32f5 HTTP/1.1
  38. Host: vod-prep-sec.viaplay.cdn.cra.cz
  39. Origin: https://viaplay.lv
  40. Access-Control-Allow-Credentials: true
  41. Access-Control-Allow-Headers: Content-Type, User-Agent, If-Modified-Since, Cache-Control, Range
  42. Access-Control-Allow-Methods: OPTIONS, GET, POST, HEAD
  43. Access-Control-Allow-Origin: https://viaplay.lv
  44. Access-Control-Expose-Headers: Date, Server, Content-Type, Content-Length
  45. P3p: CP="No P3P policy"
  46. Age: 0
  47. Set-Cookie: lvlt_tk=/vod_Balt/_definst_/0023/2816/eng-ao-sd1-sd2-sd3-sd4-ESFZVT6c.smil/?qs=1&ttl=10800&etime=1477825571&token=00fe2a742657b2bd5b87a; Domain=vod-prep-sec.viaplay.cdn.cra.cz; Path=/vod_Balt/_definst_/0023/2816/eng-ao-sd1-sd2-sd3-sd4-ESFZVT6c.smil/
  48. ========================= API =======================
  49. ==== Dabū produkta detaļas ===========
  50. GET https://api.viaplay.support/api/v1/products/id-t6764/detail/ HTTP/1.1
  51. X-OTT-User-SubProfile: master
  52. X-OTT-Data-Profile: mobile
  53. X-OTT-Language: lv
  54. X-OTT-Catalogue: LV_VIAPLAY
  55. Accept-Encoding:
  56. X-OTT-Device-Type: ANDROID
  57. X-OTT-App-Version: 1.0
  58. Accept: application/json
  59. User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.4.2; SM-G900FD Build/KOT49H)
  60. Host: api.viaplay.support
  61. Connection: Keep-Alive