Skip to content

Commit

Permalink
Update scrapewords.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Jetroid committed Feb 7, 2019
1 parent 036a23f commit 84df1a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scrapewords.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

words = {}
for x in range(5,11):
#Get the HTML page from the UK charts for our current date
#Get the HTML page from the page for our word length
page = requests.get('http://www.allscrabblewords.com/' + str(x) + '-letter-words/')
tree = html.fromstring(page.content)

#Use XPATH queries to get artists and titles from page
#Use XPATH queries to get words from page
words[str(x)] = tree.xpath('//ul[@class="list-inline"]//li//a//text()')
words[str(x)] = [word.upper() for word in words[str(x)]]

Expand Down

0 comments on commit 84df1a6

Please sign in to comment.