Archived
1
0
Fork 0

support relative URLs

This commit is contained in:
Lukas Winkler 2018-01-07 14:01:48 +01:00
parent 698bdb824c
commit 1ce6c39a79

View file

@ -2,6 +2,7 @@ import asyncio
import logging
import sys
from time import mktime
from urllib.parse import urljoin
import aiohttp
import feedparser
@ -75,6 +76,7 @@ async def handle_feed(session, wall, sitetitle, site):
# feedtitle = f["feed"]["title"]
if "latest_article" in site:
for article in f.entries:
print(urljoin(site["url"], article.link))
if article.title == site["latest_article"]:
logger.debug("already added: " + article.title)
break