Skip to content

Instantly share code, notes, and snippets.

@mavhc
Created March 9, 2021 08:13
Show Gist options
  • Save mavhc/abc7e8d7fd1debf5724e48fadfaa805c to your computer and use it in GitHub Desktop.
Save mavhc/abc7e8d7fd1debf5724e48fadfaa805c to your computer and use it in GitHub Desktop.
from bs4 import BeautifulSoup
import urllib.request
import re
html = urllib.request.urlopen("https://www.cc.com/shows/the-daily-show-with-trevor-noah")
soup = BeautifulSoup(html,'html.parser')
for link in soup.findAll('a', text=re.compile(".*LATEST EPISODE.*")):
print(link.get('href'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment