File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ def _validate_feed(self):
213213 if root_child .tag == 'channel' :
214214 channel = root_child
215215 break
216- if not channel :
216+ if channel is None :
217217 raise FeedStructureError (
218218 "RSS feed does not have a channel tag as its child" )
219219
Original file line number Diff line number Diff line change 11import xml .etree .ElementTree as ElementTree
22from typing import List
33
4- from castero .feed import Feed , FeedDownloadError
4+ from castero .feed import Feed , FeedDownloadError , FeedParseError
55
66
77class SubscriptionsError (Exception ):
@@ -138,6 +138,8 @@ def parse(self) -> None:
138138 yield feed
139139 except FeedDownloadError as e :
140140 yield (entry .attrib ['xmlUrl' ], e )
141+ except FeedParseError as e :
142+ yield (entry .attrib ['xmlUrl' ], e )
141143
142144 def _find_rss_container (self , container ):
143145 """Find potentially-nested container for RSS feeds.
@@ -153,7 +155,7 @@ def _find_rss_container(self, container):
153155 return None
154156
155157 if 'type' in outline .attrib and \
156- outline .attrib ['type' ].lower () == 'rss' :
158+ outline .attrib ['type' ].lower () in [ 'rss' , 'link' ] :
157159 return container
158160 else :
159161 return self ._find_rss_container (outline )
You can’t perform that action at this time.
0 commit comments