This article walks you through how to get the ID of any YouTube video.
You may be watching the video or just happened to visit a link to a video. The video ID will be located in the URL of the video page, right after the v= URL parameter.
This article walks you through how to get the ID of any YouTube video.
You may be watching the video or just happened to visit a link to a video. The video ID will be located in the URL of the video page, right after the v= URL parameter.
| --- | |
| title: "Visualizing the Clinton Email Network in R" | |
| author: "hrbrmstr" | |
| date: "`r Sys.Date()`" | |
| output: html_document | |
| --- | |
| ```{r include=FALSE} | |
| knitr::opts_chunk$set( | |
| collapse=TRUE, | |
| comment="#>", |
| import urllib2 | |
| def file_exists(location): | |
| request = urllib2.Request(location) | |
| request.get_method = lambda : 'HEAD' | |
| try: | |
| response = urllib2.urlopen(request) | |
| return True | |
| except urllib2.HTTPError: | |
| return False |