Skip to content

Commit

Permalink
Cleaned up code
Browse files Browse the repository at this point in the history
Marc Laventure committed Aug 10, 2014
1 parent 45863ac commit 917ce49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions InstaBot.py
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@ def getTopHashTags(br):

def like(br, hashtags):

br.open(WEBSTA_URL + "tag/love")
likes = 0

for hashtag in hashtags:
@@ -47,13 +46,13 @@ def like(br, hashtags):
for id in media_id:
br.open(WEBSTA_LIKE + id)
if bool(re.match("{\"status\":\"OK\",\"message\":\"LIKED\"", br.response().read())):
print "YOU LIKED" + str(id)
print "YOU LIKED " + str(id)
likes += 1
time.sleep(profile['SLEEPTIME'])
else:
print "SOMETHING WENT WRONG"
print br.response().read()
print "SLEEPING FOR " + str(profile['SLEEPTIME'])
print "SLEEPING FOR 60 seconds"
print "CURRENTLY LIKED " + str(likes) + " photos"
time.sleep(60)

0 comments on commit 917ce49

Please sign in to comment.