Skip to content

Instantly share code, notes, and snippets.

@JeffersGlass
Created September 13, 2020 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffersGlass/f61731bd75061bfb179e3dbec197e2d3 to your computer and use it in GitHub Desktop.
Save JeffersGlass/f61731bd75061bfb179e3dbec197e2d3 to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
url = "http://jeff.glass/bs.html"
websiteText = requests.get(url).text
soup = BeautifulSoup(websiteText, 'lxml')
print(soup.body.ul)
items = soup.body.ul.find_all('li')
for i in items:
print(">>>" + i.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment