fixed bug double tweets on FE

This commit is contained in:
Manuel Hude 2021-05-04 20:38:40 +02:00
parent f42fbfcb59
commit cd759aa6f7
2 changed files with 3 additions and 3 deletions

View File

@ -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")

View File

@ -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 => {