Skip to content

Instantly share code, notes, and snippets.

@sa7mon
Created Dec 21, 2016
Embed
What would you like to do?
Methodology for downloading from Seeso

#Seeso Methodology

  1. Get video clip info

    Request

     GET https://feed.theplatform.com/f/NZILfC/nbcott-prod-all-media?byAvailabilityState=available&byId=[EPISODEIDHERE]&form=cjson
    
**Response** (Available resolutions with bogus links that just point to the default resolution)
...
...
"pubDate": 1478145600000,
      "defaultThumbnailUrl": "https://chaosic.akamaized.net/.../161101_3418565_Cheetos.jpg",
      "provider": "Chaos",
      "programId": "http://data.entertainment.tv.theplatf...",
      "seriesId": "http://data.entertainment.tv.theplatform.com/ente.t",
      "publicUrl": "https://link.theplatform.com/s/NZI..RK1",
      "nbc-chaos$advertisingGenre": "Comedy",
      "nbc-chaos$episodeNumber": 6,
      "nbc-chaos$freeContent": false,
      "nbc-chaos$fullEpisode": false,
      "nbc-chaos$originalAirdate": 1478145600000,
      "nbc-chaos$programmingType": "Clip",
      "nbc-chaos$seasonNumber": 1,
      "nbc-chaos$shortDescription": "Jeff mistakenly eats a cheeto.",
      "nbc-chaos$shortTitle": "Expanded Universe: Cheetos",
      "nbc-chaos$show": "HarmonQuest",
...
...
Info to parse from this: * Season/Episode Number * Show name * Episode Title * **publicUrl -- Necessary for later**
  1. Login in and get auth token.

    Request

POST https://www.seeso.com/api/v3/auth/login {"username":"emailhere", "password":"MYPASSWORDHERE", "userOnly":true, "isRememberMe":true,"isWeb":true}
**Response**
{"user":{"duration":1728000000, "token":"MFbLnYXIdgd2QNdyWVUokQAaaOBQsFA6", "userName":"emailhere", "userId":"https://euid.theplatform.com/idm/data/User/chaos-prod/316192373", "idleTimeout":1728000000}}
* **Token -- needed for all subsequent requests**
  1. Get the master.m3u8 file

    Request

GET https://link.theplatform.com/s/NZILfC/media/PUBLICURLHERE?feed=All%20Media%20Feed&auth=VALIDTOKENHERE&vpaid=script,flash&formats=m3u,mpeg4

Params: * publicUrl == HL3gY9Y4VRK1 * auth == 4w2nkH9Wkbsgj0YgSSUE4TBWQHDqoIC0 * (There may be other formats we can request, but they are unknown for now.)

**Response**
        #EXTM3U
        #EXT-X-STREAM-INF:BANDWIDTH=10093106,RESOLUTION=1280x720,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
        https://seesosprod-vh.akamaihd.net/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_,25,40,18,12,7,4,2,00.mp4.csmil/index_0_av.m3u8?set-akamai-hls-revision=3&id=AgDYctAjFwrwLElDVFjJE0ApHnMBvmyOrOV6mz2hU0h4MxMPm+RrEXpcSLnqp1ov6PZhnOiG+MSxNA%3d%3d&hdntl=exp=1482003657~acl=%2fi%2fprod%2fvideo%2fNBCOTT_-_Production%2f360%2f907%2f160831_3092487_Farsi_Lessons_*~data=hdntl~hmac=d934b83fff5b6ae48f7c6fe4796683931987c019347b0a3e2736a8a9da0166f2
        #EXT-X-STREAM-INF:BANDWIDTH=15084715,RESOLUTION=1920x1080,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
        https://seesosprod-vh.akamaihd.net/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_,25,40,18,12,7,4,2,00.mp4.csmil/index_1_av.m3u8?set-akamai-hls-revision=3&id=AgDYctAjFwrwLElDVFjJE0ApHnMBvmyOrOV6mz2hU0h4MxMPm+RrEXpcSLnqp1ov6PZhnOiG+MSxNA%3d%3d&hdntl=exp=1482003657~acl=%2fi%2fprod%2fvideo%2fNBCOTT_-_Production%2f360%2f907%2f160831_3092487_Farsi_Lessons_*~data=hdntl~hmac=d934b83fff5b6ae48f7c6fe4796683931987c019347b0a3e2736a8a9da0166f2
        #EXT-X-STREAM-INF:BANDWIDTH=6823252,RESOLUTION=960x540,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
        https://seesosprod-vh.akamaihd.net/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_,25,40,18,12,7,4,2,00.mp4.csmil/index_2_av.m3u8?set-akamai-hls-revision=3&id=AgDYctAjFwrwLElDVFjJE0ApHnMBvmyOrOV6mz2hU0h4MxMPm+RrEXpcSLnqp1ov6PZhnOiG+MSxNA%3d%3d&hdntl=exp=1482003657~acl=%2fi%2fprod%2fvideo%2fNBCOTT_-_Production%2f360%2f907%2f160831_3092487_Farsi_Lessons_*~data=hdntl~hmac=d934b83fff5b6ae48f7c6fe4796683931987c019347b0a3e2736a8a9da0166f2
  1. Grab URL of stream you want (Based on the resolution, codecs, CC listed--incorrect) and GET that real .m3u8 file

    Request

      https://seesosprod-vh.akamaihd.net/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_,25,40,18,12,7,4,2,00.mp4.csmil/index_1_av.m3u8?set-akamai-hls-revision=3&id=AgDYctAjFwrwLElDVFjJE0ApHnMBvmyOrOV6mz2hU0h4MxMPm+RrEXpcSLnqp1ov6PZhnOiG+MSxNA%3d%3d&hdntl=exp=1482003657~acl=%2fi%2fprod%2fvideo%2fNBCOTT_-_Production%2f360%2f907%2f160831_3092487_Farsi_Lessons_*~data=hdntl~hmac=d934b83fff5b6ae48f7c6fe4796683931987c019347b0a3e2736a8a9da0166f2
     

    Response

	#EXTM3U
	#EXT-X-TARGETDURATION:13
	#EXT-X-ALLOW-CACHE:YES
	#EXT-X-KEY:METHOD=AES-128,URI="https://seesosprod-vh.akamaihd.net/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_,25,40,18,12,7,4,2,00.mp4.csmil/crypt.key?set-akamai-hls-revision=3&id=AgDYctAjFwrwLElDVFjJE0ApHnMBvmyOrOV6mz2hU0h4MxMPm+RrEXpcSLnqp1ov6PZhnOiG+MSxNA%3d%3d&hdntl=exp=1482003657~acl=/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_*~data=hdntl~hmac=d934b83fff5b6ae48f7c6fe4796683931987c019347b0a3e2736a8a9da0166f2"
	#EXT-X-PLAYLIST-TYPE:VOD
	#EXT-X-VERSION:3
	#EXT-X-MEDIA-SEQUENCE:1
	#EXTINF:12.012,
	https://seesosprod-vh.akamaihd.net/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_,25,40,18,12,7,4,2,00.mp4.csmil/segment1_1_av.ts?set-akamai-hls-revision=3&id=AgDYctAjFwrwLElDVFjJE0ApHnMBvmyOrOV6mz2hU0h4MxMPm+RrEXpcSLnqp1ov6PZhnOiG+MSxNA%3d%3d&hdntl=exp=1482003657~acl=/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_*~data=hdntl~hmac=d934b83fff5b6ae48f7c6fe4796683931987c019347b0a3e2736a8a9da0166f2
	#EXTINF:12.012,
	https://seesosprod-vh.akamaihd.net/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_,25,40,18,12,7,4,2,00.mp4.csmil/segment2_1_av.ts?set-akamai-hls-revision=3&id=AgDYctAjFwrwLElDVFjJE0ApHnMBvmyOrOV6mz2hU0h4MxMPm+RrEXpcSLnqp1ov6PZhnOiG+MSxNA%3d%3d&hdntl=exp=1482003657~acl=/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_*~data=hdntl~hmac=d934b83fff5b6ae48f7c6fe4796683931987c019347b0a3e2736a8a9da0166f2
	#EXTINF:12.012,
	https://seesosprod-vh.akamaihd.net/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_,25,40,18,12,7,4,2,00.mp4.csmil/segment3_1_av.ts?set-akamai-hls-revision=3&id=AgD.....%3d&hdntl=exp=1482003657~acl=/i/prod/video/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons_*~data=hdntl~hmac=d934b83f....166f2
	#EXTINF:12.012,
  1. Now we have the real .m3u8 file with that streams .ts files. Save and convert with VLC/ffmpeg/etc. Closed Captions are provded, despite saying otherwise in the master.m3u8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment