This file contains 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 characters
# YouTube often removes videos without notice | |
# Download your playlists using this simple script (avoids downloading duplicates) | |
# 1. have python3 (brew install python or brew upgrade python) | |
# 2. get pytube (https://github.com/nficano/pytube) | |
# 3. (probably) follow instructions here if you run into regex issues with akamai https://github.com/nficano/pytube/pull/313 | |
# 3a. find the location of pytube using 'pip3 show pytube' | |
from pytube import Playlist | |
from pytube import YouTube | |
from pytube.helpers import safe_filename |
This file contains 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 characters
# monkey patch to correct Twitter gem experiencing EOF errors | |
# thread here: https://dev.twitter.com/discussions/15989#comment-35662 | |
# add any where to your code before using the Twitter gem | |
module Twitter | |
class Client | |
def connection | |
@connection ||= Faraday.new(@endpoint, @connection_options.merge(:builder => @middleware)) do |f| | |
f.headers = { "Connection" => "" } | |
end | |
end |