Changeset 35 for plinkpot

Show
Ignore:
Timestamp:
08/07/07 20:35:06 (5 years ago)
Author:
simon
Message:
  • Check the link before potting.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plinkpot/linkpot

    r34 r35  
    33import urllib 
    44import re 
     5 
     6 
     7def check_link(url): 
     8    # Get the URL to check it "works" 
     9    urllib.urlopen(url) 
    510 
    611pot_re = re.compile(r'Your quick url is <a href="(http://linkpot.net/.*?)"') 
     
    1520    import sys 
    1621    try: 
     22        check_link(sys.argv[1]) 
    1723        print linkpot(sys.argv[1]) 
    1824    except Exception: