Skip to content

Instantly share code, notes, and snippets.

@bradleysawler
Created September 28, 2020 00:31
Show Gist options
  • Save bradleysawler/22ab4536456a4461027d0e2aae172614 to your computer and use it in GitHub Desktop.
Save bradleysawler/22ab4536456a4461027d0e2aae172614 to your computer and use it in GitHub Desktop.
Had a list of videos to watch. Saved it to my local drive. Scraped the list of titles and pased it into OmniFocus
# Scrape a local html file for specific tags and their strings
from bs4 import BeautifulSoup
# Input the saved HTML location
file = r'/Users/bgs/Downloads/EAOnDemand.html'
# Create a BeautifulSoup object
soup = BeautifulSoup(open(file), 'html.parser')
# Include tags into the list, as required
for tag in soup.find_all(['h2']):
print(tag.string)
# Copy from the terminal and paste into OmniFocus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment