Skip to content

Instantly share code, notes, and snippets.

/Test

Created April 25, 2017 22:16
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 anonymous/5eb7d0ebff500337e6f8b3c03fcb55a4 to your computer and use it in GitHub Desktop.
Save anonymous/5eb7d0ebff500337e6f8b3c03fcb55a4 to your computer and use it in GitHub Desktop.
import bs4 as bs
import urllib.request
source = urllib.request.urlopen('http://www.nfl.com/big-play-highlights').read()
soup = bs.BeautifulSoup(source,'lxml')
soup.find_all('h2')[0:5]
for url in soup.find_all('loc'):
print(url.text)
#for url in soup.find_all('a'):
# print(url.get('href'))
#for url in soup.find_all('loc'):
# print(url.text)
##used to make requests
#import urllib.request
#
#x = urllib.request.urlopen('http://www.nfl.com/videos')
#print(x.read())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment