Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Twitter] Metadata only shows date of when the tweet was retweeted, not when it was originally posted #4337

Open
flanpowered opened this issue Jul 22, 2023 · 3 comments

Comments

@flanpowered
Copy link

I'm using the following config:

{
    "extractor":{
        "cookies": ["firefox"],
        "twitter":{
            "users": "https://twitter.com/{legacy[screen_name]}",
            "text-tweets":true,
            "quoted":true,
            "retweets":true,
            "logout":true,
            "replies":true,
            "filename": "{date:%Y-%m-%d}-{author[name]}-{tweet_id}-{num}-{filename}.{extension}",
	    "base-directory": "users",
            "directory":{
		"retweet_id != 0": ["{user[name]}", "Retweets"	],
                "quote_id   != 0": ["{user[name]}", "Quoted"	],
                ""               : ["{user[name]}", "Tweets"    ]
            },
            "postprocessors":[
                {"name": "metadata", "event": "post", "filename": "{date:%Y-%m-%d}-{author[name]}-{tweet_id}.json"}
            ]
        }
    }
}

And the resulting metadata only shows the date when the tweet was retweeted, not the date when it was posted:

{
    "tweet_id": 1234567890,
    "retweet_id": 1234567890,
    "quote_id": 0,
    "reply_id": 0,
    "conversation_id": 1234567890,
    "date": "2022-11-18 14:55:17",
    "author": {
        "id": 1234567890,
        "name": "XXXXXXXXXX",
        "nick": "XXXXXXXX",
        "location": "XXXXXXXXXXXXX",
        "date": "2009-07-18 17:27:36",
        "verified": false,
        "profile_banner": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "profile_image": "XXXXXXXXXXXXXXXXXXXXXXX",
        "favourites_count": 17688,
        "followers_count": 422517,
        "friends_count": 111,
        "listed_count": 3602,
        "media_count": 59628,
        "statuses_count": 119436,
        "description": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "user": {
        "id": 1234567890,
        "name": "XXXXXXXXXXXXX",
        "nick": "XXXXXXXXXXXXXXXXXX",
        "location": "XXXXXXXXXXXXX",
        "date": "2013-06-01 14:25:35",
        "verified": false,
        "profile_banner": "XXXXXXXXX",
        "profile_image": "XXXXXXXX.jpg",
        "favourites_count": 32876,
        "followers_count": 66,
        "friends_count": 292,
        "listed_count": 2,
        "media_count": 2099,
        "statuses_count": 13483,
        "description": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "url": "URL"
    },
    "lang": "es",
    "favorite_count": 0,
    "quote_count": 0,
    "reply_count": 0,
    "retweet_count": 35495,
    "mentions": [
        {
            "id": 1234567890,
            "name": "XXXXXX",
            "nick": "XXXXX"
        }
    ],
    "content": "RT @username: TEXT",
    "count": 0,
    "category": "twitter",
    "subcategory": "timeline"
}
@Hrxn
Copy link
Contributor

Hrxn commented Jul 22, 2023

If you want the "original" info from the source tweet, not the retweet, set the extractor.twitter.retweets option to "original" instead of true

@flanpowered
Copy link
Author

The metadata created when using the value "original" works better for me, but isn't there a way to get both the posted date and the retweeted date?

@flanpowered
Copy link
Author

Any news on this? Isn't there a way to keep the original tweet's metadata while adding something like a date_retweeted field that shows the date when the user retweeted it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants