Tkd-Alex / Telegram-InstaPy-Scheduling

A Telegram bot for scheduling InstaPy
152 stars 38 forks source link

Any way to add the tags from telegram? #5

Open luigifaticoso opened 6 years ago

luigifaticoso commented 6 years ago

Could it be possible to import the tags from telegram, separated by a comma, to an array of tags? Using in the code something like this

from random import sample

tags = [ 'photography', 'landscape', 'portrait' , 'drone', 'travel', 'gopro', 'adventure', 'camera' , 'sony']

[...]

session.like_by_tags(sample(tags, 3), amount=20, media='Photo')

Could be an idea!

Tkd-Alex commented 6 years ago

I have thinking many time to this feature. My idea is create a command like this: /newhashtag \<name> [list]

And when we set a new schedule use the command as /set \<name> \<hh:mm:ss> \<namesamplehash> /set Now 13:45:00 sample1

What do you think about this?

Tkd-Alex commented 6 years ago

Anyway, i haven't developed this feature because the InstaPy script (code inside threadRun()) are personal and equal for all user using or not this Telegram-Bot. For use tags imported by telegram the script need to be edit (for example) like this:

if telegramhashtag = True:
    session.like_by_tags(telegramhastag, amount=20, media='Photo')
else:
   session.like_by_tags(["#a", "#b", ...], amount=20, media='Photo')

Many users coming from instapy may have some difficulty with this configuration. Another idea can be change /set command and guide the Telegram-Instapy user to create a new custom script (like a GUI) for example:

This bot born for personal user but i'm very happy to improve it for all. Any suggestion are welcome :grin: