Skip to content

Commit

Permalink
Add more verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
omegafrost committed Nov 27, 2016
1 parent 3df6e8e commit 697853b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions dislike.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ def post(url, data):

def login():

username = input('Username')
password = getpass('Password')
username = input('Username: ')
password = getpass('Password: ')

print('logging in... ', end='', flush=True)

page = post('http://forum.outerspace.com.br/index.php?login/login', {
"login" : username,
Expand All @@ -94,9 +96,12 @@ def login():
})

if page.find('section visitorPanel') < 0:
print('failed!')
print(page)
raise Exception("Login failed!")

print('ok.')

###############################################################################
#
###############################################################################
Expand Down Expand Up @@ -127,6 +132,8 @@ def dislike(posts):

login()

print('going through %d posts...' % len(posts))

for p in posts:

# Posts or Profile posts
Expand Down Expand Up @@ -157,7 +164,7 @@ def dislike(posts):
else:
raise Exception('Unknown option %s' % p)

print('-' if dislike_one(p) else '.', end='')
print('-' if dislike_one(p) else '.', end='', flush=True)

###############################################################################
# Post list compressed using zlib and encoded in base 64
Expand Down

0 comments on commit 697853b

Please sign in to comment.