Commit 54ca8845 authored by Quentin Aristote's avatar Quentin Aristote
Browse files

corrected last page error

parent 9b066d52
......@@ -86,15 +86,18 @@ def getNextHTML(html_current) :
:param html_current: the initial HTML code to scrape for the next page."""
html = html_current
yield html
td = html.find('td', attrs = {'class' : 'next'})
button = html.find('td', attrs = {'class' : 'next'})
while td :
url = HOSTNAME + td.find('a')['href']
html = getHTML(url)
yield html
td = html.find('td', attrs = {'class' : 'next'})
if button :
button = button.find('a')
while button :
url = HOSTNAME + button['href']
html = getHTML(url)
yield html
button = html.find('td', attrs = {'class' : 'next'}).find('a')
def getFilesIDs(html) :
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment