This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import json | |
import requests | |
import sys | |
def extract_data(v): | |
"""Extract id, title and duration""" | |
id = v["id"]["videoId"] | |
title = v["snippet"]["title"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import json | |
import requests | |
import isodate | |
def extract_data(json_data): | |
"""Extract id, title and duration""" | |
id = json_data["id"] | |
title = json_data["snippet"]["title"] |