Update and rename GetMetadata.py to getMetadata.py

This commit is contained in:
afkarxyz authored and GitHub committed 2025-01-22 17:34:28 +07:00
1 parent aa89fda847
commit 81bacad4d8
1 file changed
+10 -3
@@ -53,10 +53,17 @@ def get_metadata(username):
tweet_date = tweet_data.get('date', datetime.now())
if isinstance(tweet_date, datetime):
tweet_date = tweet_date.strftime("%Y-%m-%d %H:%M:%S")
output['timeline'].append({
timeline_entry = {
'url': media_url,
'date': tweet_date
})
'date': tweet_date,
'tweet_id': tweet_data.get('tweet_id', 0),
}
if 'type' in tweet_data:
timeline_entry['type'] = tweet_data['type']
output['timeline'].append(timeline_entry)
output['total_urls'] += 1
current_dir = os.path.dirname(os.path.abspath(__file__))