Skip to content

Instantly share code, notes, and snippets.

@umar-ahmed
Created August 18, 2019 20:01
Show Gist options
  • Save umar-ahmed/b380f9af850c58e9b3e356fb61ec6d89 to your computer and use it in GitHub Desktop.
Save umar-ahmed/b380f9af850c58e9b3e356fb61ec6d89 to your computer and use it in GitHub Desktop.

Revisions

  1. umar-ahmed created this gist Aug 18, 2019.
    20 changes: 20 additions & 0 deletions youtube.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    import requests
    import json

    url = 'https://gist.github.com/umar-ahmed/9feac2a7b28b2843f880012c97e0c564/raw/e147f3476d02c658dbfdec4175f6c67398e55285/youtube'
    response = requests.get(url)

    print(response.status_code)

    content = response.text

    data = json.loads(content)

    length = len(data)

    print(length)

    for i in range(length):
    title = data[i]["snippet"]["title"]
    print(title)