Imgur Downvote Bomb

This script is designed to automate the process of downvoting every comment that a user has ever made. It requires the official Imgur python library, found here:

from imgurpython import ImgurClient
import math

def get_input(string):
    return raw_input(string)
    return input(string)

def authenticate():
  client_id = ''
  client_secret = ''

  client = ImgurClient(client_id, client_secret)
  authorization_url = client.get_auth_url('pin')

  print("Go to the following URL: {0}".format(authorization_url))
  pin = get_input("Enter pin code: ")

  credentials = client.authorize(pin, 'pin')
  client.set_user_auth(credentials['access_token'], credentials['refresh_token'])

  print("Auth successful!  Here are the details:")
  print("Access token: {0}".format(credentials['access_token']))
  print("Refresh token: {0}".format(credentials['refresh_token']))

  return client

if __name__ == "__main__":
  client = authenticate()
  dv_target = get_input("Who would you like to downvote bomb?")

  dv_comment_count = client.get_account_comment_count(dv_target)
  max_pages = int(math.ceil(dv_comment_count / 50.0))
  print("{0} has {1} pages of comments.".format(dv_target, max_pages))

  for x in range(0, max_pages):
    print("Bombing page {0}".format(int(x + 1)))
    for comment in client.get_account_comment_ids(dv_target, sort='newest', page=x):
      client.comment_vote(comment, vote='down')
      print("Downvoting comment with id: {0}".format(comment))

  print("Downvote bomb complete.")
© 2014 - 2021 · Home ·