resp = requests.get(url, params=params) data = resp.json()
| | | |---|---| | Positive | 68 % | | Neutral | 22 % | | Negative | 10 % | | Top words | “home”, “memories”, “great”, “thanks”, “family” | welcome home 2012 ok.ru
# ---- Extract what we need ---- views = data.get('view_count') likes = data.get('like_count') shares = data.get('repost_count') comments = data.get('comment_count') duration = data.get('duration') title = data.get('title') description= data.get('description') upload_ts = data.get('created_time') author = data.get('owner_name') tags = data.get('tags', []) resp = requests
url = 'https://api.ok.ru/fb.do' params = 'method': 'video.get', 'access_token': API_TOKEN, 'video_id': VIDEO_ID, 'format': 'json' resp = requests.get(url
import requests import json