Skip to content

Instantly share code, notes, and snippets.

@davedavis
Created January 29, 2019 23:43
Show Gist options
  • Save davedavis/d6af70b8dfeb7044825e99652f9a9a5f to your computer and use it in GitHub Desktop.
Save davedavis/d6af70b8dfeb7044825e99652f9a9a5f to your computer and use it in GitHub Desktop.
Basic Beautiful Soup Request
from bs4 import BeautifulSoup
from urllib import request
x = 4
print(x)
testlist = {1,2,3,4}
for num in testlist:
print(num)
url = 'https://github.com/davedavis'
html = request.urlopen(url)
bs = BeautifulSoup(html.read(), 'html.parser')
print(80*"*")
print(bs.h1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment