Subdomain Posts
Python | 13 days ago
C# | 18 days ago
C# | 19 days ago
C# | 20 days ago
C# | 20 days ago
C | 164 days ago
Python | 167 days ago
C++ | 188 days ago
PHP | 252 days ago
Python | 299 days ago
Recent Posts
C++ | 26 sec ago
None | 27 sec ago
None | 33 sec ago
C | 38 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
C | 3 min ago
None | 3 min ago
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 IceDragon on the 14th of Apr 2009 06:14:02 PM Download | Raw | Embed | Report
  1. #!/usr/bin/python                                                            
  2.  
  3. ###--# Imports #--###
  4. import urllib        
  5.  
  6. from time import time
  7.  
  8.  
  9. ###--# Configuration #--###
  10. names = [                  
  11.     "artex",              
  12.     "cpu",                
  13.     "dreamgrabber"        
  14. ]                          
  15.  
  16.  
  17. # Forming URL
  18. url = "http://on.furcadia.com/q/?%d&%s" % ( int(time()), "&".join(names) )
  19.  
  20. # Sending request and retrieving data
  21. data = urllib.urlopen(url).read()
  22.  
  23. # Parsing data
  24. for line in data.split("\n"):
  25.     if line == "":
  26.         continue
  27.  
  28.     if line[0] == "+":
  29.         print "%s is online" % line[1:]
  30.     elif line[0] == "O":
  31.         print "%4s furres online\n" % line[1:]
  32.     elif line[0] == "T":
  33.         print "T parameter: " + line[1:]
  34.     else:
  35.         print "UNIDENTIFIED: " + line
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: