diff --git a/backend/app_be/views/twitter_api.py b/backend/app_be/views/twitter_api.py index a32cdee..f669319 100644 --- a/backend/app_be/views/twitter_api.py +++ b/backend/app_be/views/twitter_api.py @@ -58,12 +58,12 @@ class twitter_api: @staticmethod def get_more_tweets(twitter_id): - last_six = api.GetUserTimeline(screen_name='waecmg4', count=6, exclude_replies=True, include_rts=False, + last_six = api.GetUserTimeline(screen_name='waecmg4', count=7, exclude_replies=True, include_rts=False, max_id=twitter_id) response = [] - for tweet in last_six: + for tweet in last_six[1:]: print(tweet) parsed_date = datetime.strptime(tweet.created_at, "%a %b %d %H:%M:%S +0000 %Y") diff --git a/frontend/src/app/component/tweets/tweets.component.ts b/frontend/src/app/component/tweets/tweets.component.ts index c661000..0bf4693 100644 --- a/frontend/src/app/component/tweets/tweets.component.ts +++ b/frontend/src/app/component/tweets/tweets.component.ts @@ -61,10 +61,10 @@ export class TweetsComponent implements OnInit { this._snackbarService.show('Keine weiteren Tweets vorhanden', 'Schließen'); } - for (const tweet of data) { const position = tweet.text.search(': http'); tweet.text = tweet.text.substring(0, position); + this.tweets.push(tweet); } }, err => {