Skip to content

Commit

Permalink
Swapping to beautifulsoup4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ric Harvey committed Jan 16, 2017
1 parent 504f1d1 commit 0e6262f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions getAWSdocs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python

from BeautifulSoup import BeautifulSoup
from bs4 import BeautifulSoup
import urllib
import urlparse
import posixpath
Expand All @@ -11,7 +11,7 @@
def get_services():
html_page = urllib.urlopen("http://aws.amazon.com/documentation/")
# Parse the HTML page
soup = BeautifulSoup(html_page)
soup = BeautifulSoup(html_page, 'html.parser')
urls = []
services = []
# Get the A tag from the parsed page
Expand All @@ -38,7 +38,7 @@ def get_pdfs(services):
print "\nDownloading PDF's for : " + url + "\n"
# Parse the HTML page
html_page_doc = urllib.urlopen(url)
soup_doc = BeautifulSoup(html_page_doc)
soup_doc = BeautifulSoup(html_page_doc, 'html.parser')
# Get the A tag from the parsed page
for link in soup_doc.findAll('a'):
pdf = link.get('href')
Expand Down

0 comments on commit 0e6262f

Please sign in to comment.