Skip to content

Instantly share code, notes, and snippets.

#!/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"]
@fblampe
fblampe / get_youtube_data.py
Created March 31, 2022 19:34
Fetches video data from YouTube API for a given channel and query, including title, description, publish date, thumbnail link and ID.
#!/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"]