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
# Downloads all Project Euler problems and stores them in a file with their number | |
# | |
# These files can be changed to any language's file extension, and comment the text out | |
# to have a nicely formatted file | |
# | |
# Requirements: BeautifulSoup4 and requests | |
from bs4 import BeautifulSoup | |
import re | |
import requests |
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
# download all pkn episodes from podbean | |
from bs4 import BeautifulSoup | |
import requests | |
# download function (this is a super useful function in general) | |
def download(url, file_name): | |
# open in binary mode | |
with open(file_name, "wb") as file: | |
# get request | |
response = requests.get(url) |
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
{"lastUpload":"2020-08-25T20:10:56.456Z","extensionVersion":"v3.4.3"} |
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
# get total time of all mp3 files in the current directory (1/21/19) | |
import os | |
from mutagen.mp3 import MP3 | |
total = 0 | |
for file in os.listdir("."): | |
if not file.endswith(".mp3"): continue | |
audio = MP3(file) | |
total += audio.info.length |
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
# download internetbox episodes (2/6/2019) | |
# | |
# super quick script to download all episodes of the Internet Box podcast | |
import requests | |
# download function (this is a super useful function in general) | |
def download(url, file_name): | |
# open in binary mode | |
with open(file_name, "wb") as file: |