forked from sch/Slixfeed
Update slixfeed.py
This commit is contained in:
parent
9cd101a26d
commit
64dd05837d
1 changed files with 12 additions and 11 deletions
23
slixfeed.py
23
slixfeed.py
|
@ -374,17 +374,18 @@ async def download_updates(conn):
|
||||||
source = url[0]
|
source = url[0]
|
||||||
html = await download_page(url[0])
|
html = await download_page(url[0])
|
||||||
print(url[0])
|
print(url[0])
|
||||||
try:
|
if html:
|
||||||
feed = feedparser.parse(html)
|
try:
|
||||||
if feed.bozo:
|
feed = feedparser.parse(html)
|
||||||
bozo = ("WARNING: Bozo detected for feed <{}>. "
|
if feed.bozo:
|
||||||
"For more information, visit "
|
bozo = ("WARNING: Bozo detected for feed <{}>. "
|
||||||
"https://pythonhosted.org/feedparser/bozo.html"
|
"For more information, visit "
|
||||||
.format(source))
|
"https://pythonhosted.org/feedparser/bozo.html"
|
||||||
print(bozo)
|
.format(source))
|
||||||
except (IncompleteReadError, IncompleteRead, error.URLError) as e:
|
print(bozo)
|
||||||
print(e)
|
except (IncompleteReadError, IncompleteRead, error.URLError) as e:
|
||||||
continue
|
print(e)
|
||||||
|
return
|
||||||
# TODO Place these couple of lines back down
|
# TODO Place these couple of lines back down
|
||||||
# NOTE Need to correct the SQL statement to do so
|
# NOTE Need to correct the SQL statement to do so
|
||||||
entries = feed.entries
|
entries = feed.entries
|
||||||
|
|
Loading…
Reference in a new issue