Last active
February 4, 2016 20:13
-
-
Save chowmean/9d1e69d91acb8d8e4e58 to your computer and use it in GitHub Desktop.
Revisions
-
chowmean revised this gist
Aug 21, 2015 . No changes.There are no files selected for viewing
-
chowmean created this gist
Aug 21, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ # Author: chowmean # simple python script to get the comment of youtube videos using google apis get method # Date: 21:08:2015 # mail: gaurav.dev.iiitm@gmail.com # github:github.com/chowmean # import oauth2 import time import urllib2 import json import requests url= "https://www.googleapis.com/youtube/v3/commentThreads" params=dict() api_key='Your_API_KEY' videoId='pxofwuWTs7c' params["part"] = "snippet" #mandatory params["maxResults"] = "50" #optional params["textFormat"] = "plainText" #or html params["videoId"] = videoId params["key"] = api_key url=url+'?' i=0 for key,value in params.iteritems(): if i==0: url=url+key+'='+value i=i+1 else: url=url+'&'+key+'='+value print url resp=requests.get(url) print resp.content