basti2342 / retweet-bot

Retweets tweets mentioning your hashtag/search query. Supports Twitter API v1.1.
Mozilla Public License 2.0
127 stars 96 forks source link

Where's the config file? #17

Open psegovias opened 7 years ago

psegovias commented 7 years ago

Not present on project.

Regards.

basti2342 commented 7 years ago

Woops, yes, you are right. The last pull request removed it without mentioning and I did not pay attention. Will fix it within the next days.

jeromecc commented 7 years ago

Here it is: config.sample https://github.com/basti2342/retweet-bot/commit/1c4621f8410ff210f89c804356295cd3700edda6#diff-755a5b26e014be32395d2ff7f722e183

jeromecc commented 7 years ago

Missing 1 config argument inside [settings]

number_of_rt:

Look here: https://github.com/jeromecc/doctoctocbot/blob/master/config.sample

MChambers1992 commented 6 years ago

Fixed in #19 if @basti2342 wants to merge it.

jeromecc commented 5 years ago

Best practice with open source projects on public repositories would be to put keys & secrets in environment variables & get them with os.getenv(key, default=None) because one day or the other the secrets will end up being published by mistake on the public git :smile:

MChambers1992 commented 5 years ago

@jeromecc absolutely right, I use a different config style in my fork which avoids this problem by including sample files. If anybody is looking to use this bot I would recommend my fork over this as it has many more features.

https://github.com/MChambers1992/retweet-bot

mwoolweaver commented 5 years ago

@MChambers1992 when running the bot for the first time it gives the following errors

WARNING:root:No savepoint found. Bot is now searching for results (2019-04-25 01:07:25) b'voucher_swap': b'#pihole is amazing!'

ERROR:root:[{'code': 327, 'message': 'You have already retweeted this Tweet.'}] (2019-04-25 01:43:43) b'voucher_swap': b"#pivpn and #pihole make a great combo for when you're on the go"

ERROR:root:[{'code': 327, 'message': 'You have already retweeted this Tweet.'}] Finished. 0 retweeted, 0 followed, 2 errors. Traceback (most recent call last): File "src/main.py", line 17, in retweet_core.retweet(API, CONFIG.query_objects) File "/home/mdwoolweaver/retweet-bot/src/retweet_core.py", line 108, in retweet with open(get_hashtag_file_id(query_object['search_query']), "w") as file: FileNotFoundError: [Errno 2] No such file or directory: '/home/mdwoolweaver/retweet-bot/hashes/last_id_hashtag_ff0736de86fa67e7d848cd84d23092ea'

fixed it by creating the hashes directory