Skip to content

Commit

Permalink
fixing 2 topic with space
Browse files Browse the repository at this point in the history
  • Loading branch information
ghalidouga committed Mar 15, 2020
1 parent c5f9f17 commit 3b4b6b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
21 changes: 14 additions & 7 deletions TwitterBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ def login(self):
password.perform()
time.sleep(3)

def like_tweet(self,topic):
def like_tweet(self,topic2):
bot = self.bot
urlBot = 'https://twitter.com/search?q='+topic+'&src=typed_query&f=live'
urlBot = 'https://twitter.com/search?q='+topic2+'&src=typed_query&f=live'
bot.get(urlBot)
print(topic2)

time.sleep(3)
n = 0
Expand Down Expand Up @@ -102,25 +103,31 @@ def like_tweet(self,topic):

again = input("Finished! But do you want to do it again ? \n Type YES or NO \n")
if again == 'YES':
ed.like_tweet(topic)
ed.like_tweet(topic2)
if again == 'NO':
sys.exit(0)




print("TwitterBot v.2.0-alpha by ghalidouga")
print("TwitterBot v.2.1-alpha by ghalidouga")
email = input("Enter your email/username \n")
password = input("Enter your password \n")
topic = input("Enter your topic \n")
topic2 = input("Enter your topic \n")
spasi = topic2.find(' ')
print(spasi)
topic2 = list(topic2)
topic2[spasi] = '%20'
topic2 = ''.join(map(str, topic2))
print(topic2)
hashtagmode = input("Do you want to add a Hashtag(#) in your topic ? \n Type YES or NO \n")
retweetTweet = ( input("Do you want to auto-retweet ? \n Type YES or NO \n"))
likeTweet = ( input("Do you want to auto-like ? \n Type YES or NO \n"))
repeatAction = int(input("Enter how many times do you want to execute this bot. 100 is recommended \n"))
delayRandomMin = int(input("Enter your minimum random delay time. 8 is recommended \n"))
delayRandomMax = int(input("Enter your maximum random delay time. Must be higher than previous number \n"))
if hashtagmode == 'YES':
topic = '%23'+topic
topic2 = '%23'+topic2
while delayRandomMin >= delayRandomMax:
print("Your maximum delay time cannot be lower than minimum delay time")
delayRandomMax = int(input("Enter your maximum random delay time. Must be higher than previous number \n"))
Expand All @@ -130,7 +137,7 @@ def like_tweet(self,topic):

ed = TwitterBot(email,password)
ed.login()
ed.like_tweet(topic)
ed.like_tweet(topic2)



1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Respect Twitter's TOS.
# Features
* Auto retweet
* Auto like
* Support S P A C E S
* Pause-Resume Function

# Installation
Expand Down

0 comments on commit 3b4b6b0

Please sign in to comment.