Skip to content

Instantly share code, notes, and snippets.

@flavioribeiro
Created June 10, 2016 21:19
Show Gist options
  • Select an option

  • Save flavioribeiro/635fc22330d4887be98de044390cf3b8 to your computer and use it in GitHub Desktop.

Select an option

Save flavioribeiro/635fc22330d4887be98de044390cf3b8 to your computer and use it in GitHub Desktop.
import requests
import json
import time
jobs_url = "http://internal-video-pipeline-dev-1193624058.us-east-1.elb.amazonaws.com/jobs/"
source_url = 'https://vp.nyt.com/video/2016/05/15/40007_1_retro-lsd_wg_240p.mp4'
response = requests.post(jobs_url, data=json.dumps({'productionId': '123'}))
job_info = json.loads(response.text)
response = requests.post(jobs_url + job_info['jobId'] + '/start', data=json.dumps({'source': source_url, 'presets': ['nyt_hls_720p_mid_uhd']}))
while True:
print requests.get(jobs_url + job_info['jobId']).text
time.sleep(3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment