Skip to content

Commit

Permalink
testing squad links
Browse files Browse the repository at this point in the history
  • Loading branch information
mcjules committed Jul 17, 2017
1 parent 01d02e5 commit 494bc6f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scraper.py
Expand Up @@ -11,7 +11,8 @@
def parse_club_page(url):
page = requests.get("https://www.premierleague.com/clubs")
soup = BeautifulSoup(page.content, 'html.parser')
downloads = soup.find_all('a', class_='indexItem')
team = soup.find_all('h1', class_='team')[0]
print team


# check the downloads page for the latest release (assumed to be the first download button we find)
Expand All @@ -20,9 +21,9 @@ def parse_club_page(url):

downloads = soup.find_all('a', class_='indexItem')
for download in downloads:
url = 'https://www.premierleague.com/'+download['href'].replace("overview","squad")
print url+"\n"
# parse_club_page(url)
url = 'https://www.premierleague.com'+download['href'].replace("overview","squad")
# print url+"\n"
parse_club_page(url)

# This is a template for a Python scraper on morph.io (https://morph.io)
# including some code snippets below that you should find helpful
Expand Down

0 comments on commit 494bc6f

Please sign in to comment.