Recent Posts
None | 37 sec ago
Java | 45 sec ago
C++ | 49 sec ago
C++ | 1 min ago
PHP | 1 min ago
C++ | 1 min ago
None | 1 min ago
None | 1 min ago
Lisp | 1 min ago
None | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By bigodines on the 29th of Oct 2009 10:37:12 PM Download | Raw | Embed | Report
  1. # -*- coding: utf-8 -*-
  2. import twitter
  3. import time
  4. import os
  5. from datetime import datetime
  6.  
  7. class BigoBot(object):
  8.         """
  9.         BigoBot is a Twitter bot for server manipulation. It was designed to download pr0n into our home server. Use at your own risk.
  10.         """
  11.        
  12.         def __init__(self,username,password):
  13.                 self.username = username
  14.                 self.api = twitter.Api(username=username, password=password)
  15.                 self.tweets = []
  16.                 self.latest = None
  17.  
  18.         def checkTweets(self):
  19.                 self.readTweets(self.username)
  20.  
  21.  
  22.         def readDirectMessages(self):
  23.                 return self.api.GetDirectMessages()
  24.  
  25.         def check(self):
  26.                 self.tweets = self.readDirectMessages()
  27.                 for tweet in self.tweets:
  28.                         self.download(tweet)
  29.                         self.api.DestroyDirectMessage(tweet.GetId())
  30.  
  31.         def download(self,tweet):
  32.                 url,name = tweet.GetText().split(" ")
  33.                 print "downloading:",url,name
  34.                 os.system("wget %s; mv *.torrent /discao/HD\ 1TB/torrents/%s" % (url, name))   
  35.  
  36.  
  37. if __name__ == "__main__":
  38.         bb = BigoBot("bigobot","<senha super secreta>")
  39.         while True:
  40.                 bb.check()
  41.                 time.sleep(3600)
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: