summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fead.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fead.py b/src/fead.py
index 21f559d..d1ad794 100755
--- a/src/fead.py
+++ b/src/fead.py
@@ -16,7 +16,7 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 __doc__ = 'Advert generator from web feeds'
-__version__ = '0.1.1'
+__version__ = '0.1.2'
 
 from argparse import ArgumentParser, FileType, HelpFormatter
 from asyncio import gather, open_connection, run
@@ -123,7 +123,7 @@ def parse_atom_entry(xml):
     return title, link, time, summary
 
 
-def parse_atom(xml, title):
+def parse_atom(xml, title, link):
     """Parse given Atom feed."""
     entries = []
     for child in xml:
@@ -167,7 +167,8 @@ async def fetch(raw_url):
                 assert xml[0].tag == 'channel'
                 src_title, src_link, items = parse_rss(xml[0], url.hostname)
             elif xml.tag.endswith('Atom}feed'):
-                src_title, src_link, items = parse_atom(xml, url.hostname)
+                src_title, src_link, items = parse_atom(xml, url.hostname,
+                                                        raw_url)
             else:
                 raise ValueError(f'unsupported feed format at {raw_url}')
             return (Advert(src_title, urljoin(raw_url, src_link),