File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ def __init__(self):
80
80
self ._tweepy_api = tweepy .API (auth = auth )
81
81
self ._article_queue = Queue ()
82
82
self ._tweet_queue = Queue ()
83
- self ._article_count : int = 10
83
+ self ._article_count : int = 100
84
84
self ._error_delay : int = FIVE_MINUTE
85
85
self ._max_status_length : int = 250
86
86
self ._count : int = 0
@@ -184,9 +184,13 @@ async def run(self):
184
184
response : dict [str , str | dict [str , str ] | int ] = await self .get_articles ()
185
185
if response .get ('status' ):
186
186
payload = response .get ('payload' , [])
187
+ article_titles = set ()
187
188
for article in payload :
188
- self ._logger .info (f"Article : { article } " )
189
- await self ._article_queue .put (item = article )
189
+ title = article .get ('title' )
190
+ if title not in article_titles :
191
+ article_titles .add (title )
192
+ self ._logger .info (f"Article : { article } " )
193
+ await self ._article_queue .put (item = article )
190
194
191
195
await self .create_tweets ()
192
196
You can’t perform that action at this time.
0 commit comments