crashes when parsing one of blogspot feeds
Closed this issue · 5 comments
norayr commented
actually all three feeds from https://randomphoto.blogspot.com/ blog crash the parser.
<link rel="alternate" type="application/atom+xml" title="Random Camera Blog - Atom" href="https://randomphoto.blogspot.com/feeds/posts/default" />
<link rel="alternate" type="application/rss+xml" title="Random Camera Blog - RSS" href="https://randomphoto.blogspot.com/feeds/posts/default?alt=rss" />
<link rel="service.post" type="application/atom+xml" title="Random Camera Blog - Atom" href="https://www.blogger.com/feeds/8717981/posts/default" />
so it crashes like this:
Traceback (most recent call last):
File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 3766, in _gen_georss_coords
t = [nxt(), nxt()][::swap and -1 or 1]
StopIteration
as it is seen from the quote, i use python3.7.
...
The above exception was the direct cause of the following exception:
...
File "/usr/lib/python3.7/site-packages/drv_libxml2.py", line 239, in parse
_d(reader.Name()))
File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 2052, in endElementNS
self.unknown_endtag(localname)
File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 696, in unknown_endtag
method()
File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 1463, in _end_georss_point
geometry = _parse_georss_point(self.pop('geometry'))
File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 3775, in _parse_georss_point
coords = list(_gen_georss_coords(value, swap, dims))
RuntimeError: generator raised StopIteration
thank you.
auouymous commented
It looks like you might be using feedparser 5, version 6.0.2 works fine.
kurtmckee commented
@norayr would you confirm which version of feedparser you have installed? @auouymous is correct, there should be a fix for this in feedparser 6.
norayr commented
sorry for delay, i'll check today.
norayr commented
so thank you, i updated 5.2.1 (if i remember correctly to 6.0.2 and now it works!
thank you so much!