Archived
1
0
Fork 0

Merge branch 'master' of github.com:Findus23/rss2wallabag

This commit is contained in:
Lukas Winkler 2019-04-02 13:34:56 +02:00
commit f63e6672a1
Signed by: lukas
GPG key ID: 54DE4D798D244853

View file

@ -71,7 +71,8 @@ async def main(loop, sites):
wall = Wallabag(host=config["wallabag"]["host"], client_secret=config["wallabag"]["client_secret"],
client_id=config["wallabag"]["client_id"], token=token, aio_sess=session)
sites = github_stars.get_starred_repos(config["github_username"], sites)
if "github_username" in config:
sites = github_stars.get_starred_repos(config["github_username"], sites)
await asyncio.gather(*[handle_feed(session, wall, sitetitle, site) for sitetitle, site in sites.items()])
@ -104,6 +105,9 @@ async def handle_feed(session, wall, sitetitle, site):
title = sitetitle + ": " + article.title
else:
title = article.title
if not hasattr(article, 'link'):
logger.info("no link, skipping!")
continue
url = urljoin(site["url"], article.link)
exists = await wall.entries_exists(url)
if exists["exists"]: