Skip to content

Instantly share code, notes, and snippets.

@kanghyojun
Created October 3, 2017 08:22
Show Gist options
  • Save kanghyojun/56c3b3947f7add3783cad2ccd4b84ea7 to your computer and use it in GitHub Desktop.
Save kanghyojun/56c3b3947f7add3783cad2ccd4b84ea7 to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
r = requests.get('http://www.python.org')
page = r.text
soup = BeautifulSoup(page,"html.parser")
use = soup.find("div", class_ = "applications-widget")
for i in use.find_all("li"):
print i.b.string
for link in i.span.find_all("a"):
print link.string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment