Commit 93ecc03b authored by Kiste's avatar Kiste
Browse files
parents a418e812 3fc391e0
......@@ -104,6 +104,9 @@ def do_feed(url, rules_path, verbose):
if 'comments' in url_rules:
comments = soup.select(url_rules['comments'])
soup = do_soup(soup, url_rules, url, verbose)
if not soup:
fe.content('Error doing the soup!')
continue
if comments:
for e in comments:
soup.append(e)
......@@ -122,7 +125,10 @@ def do_feed(url, rules_path, verbose):
def do_soup(soup, rules, url, verbose):
new_soup = soup.select(rules['article'])
new_soup = new_soup[0]
try:
new_soup = new_soup[0]
except IndexError:
return None
if 'next' in rules:
for page in new_soup.select(rules['next']):
if verbose:
......
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