-
I wanted to manage an English Twitter account but found it cumbersome and didn’t get around to it.
-
If I translate Japanese tweets into English and post them regularly, the account should appear active.
-
I wrote a script:
- https://gist.github.com/blu3mo/f059190e6e35dead69adfcd9998cae28
- Feel free to use it. CC-0
- Configuration explanation:
- TWITTER_CONSUMER_KEY/TWITTER_CONSUMER_SECRET/TWITTER_ACCESS_TOKEN/TWITTER_ACCESS_SECRET/TWITTER_BEARER_TOKEN
- Account for posting English tweets
- Log in to the X Developer Portal with the English account to obtain these keys
- Allow Read/Write in OAuth settings and then regenerate the keys
- SOURCE_USERNAME
- Your own account tweeting in Japanese
- In my case, it’s @blu3mo
- FETCH_USERNAME/FETCH_EMAIL/FETCH_PASSWORD
- Account for scraping
- It is recommended to use a separate account from the main or translation account
- There is a risk of being frozen due to scraping + writing the password in plaintext in the config
- I created a disposable account (blu3mo)
- TWITTER_CONSUMER_KEY/TWITTER_CONSUMER_SECRET/TWITTER_ACCESS_TOKEN/TWITTER_ACCESS_SECRET/TWITTER_BEARER_TOKEN
- Specifications: Retrieve tweets from the previous day and tweet them all at a time when people in the US time zone are awake
- Let’s do it at 11 am EST, 8 am PST
- It’s midnight in JST, perfect timing
- Use cron?
- Will it work during sleep..? (blu3mo)
- Seems unlikely
- Will it work during sleep..? (blu3mo)
- Tried using GitHub actions but encountered errors and got stuck
- https://github.com/d60/twikit/issues/169
- It’s the same issue. Someone reported it 12 hours ago, so it seems like a fairly recent bug (blu3mo)
- This aggressive scraping is tough