Changeset 35


Ignore:
Timestamp:
Jul 8, 2007, 8:35:06 PM (17 years ago)
Author:
simon
Message:
  • Check the link before potting.
File:
1 edited

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:
Note: See TracChangeset for help on using the changeset viewer.