Skip to content

Instantly share code, notes, and snippets.

@JeffersGlass

JeffersGlass/bsoup_getlist.py Secret

Created Sep 13, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.