Skip to content

Instantly share code, notes, and snippets.

View luitzenhietkamp's full-sized avatar

luitzenhietkamp

  • 22:04 (UTC +01:00)
View GitHub Profile
anonymous
anonymous / YoutubeData.ps1
Created July 16, 2017 17:08
Clear-Host
# This script assumes that you alread have a database table with at least the Youtube Code of a video as well as the ranking as columns
$QueryTarget = 'query.sql'
$Database = '`youtube`'
$Table = '`videos`'
$viewsinlanguage = " views" # Enter here whatever Youtube puts behind the number of views in your language, make sure to include the space
$1000sep = "." # Enter here the thousand seperator set in your regional settings
# The following should be a CSV file that stores the part of the URL after v= for all the Youtube video's you want to update
# The CSV file needs to have a column with header 'Youtube Code' and in the colum all the Youtube codes.
$Target = 'data.csv'