rss module: prettify & reorganize to allow for easily adding extra modules

This commit is contained in:
Dima Gerasimov 2020-05-13 22:04:23 +01:00
parent 92cf375480
commit 63d4198fd9
6 changed files with 66 additions and 58 deletions

View file

@ -7,10 +7,9 @@ from . import twint
from . import archive
from more_itertools import unique_everseen
# TODO move to .common?
def merge_tweets(*sources):
from more_itertools import unique_everseen
yield from unique_everseen(
chain(*sources),
key=lambda t: t.id_str,