]> git.street.me.uk Git - andy/viking.git/blobdiff - tools/gcget
Put vikutils.h into viking.h
[andy/viking.git] / tools / gcget
index c6c850bacf0e58cc324b21fa4a320ef7b023593b..c7b4a540fe6f2f2dee8d6ce45c51ec5335d2a4cd 100755 (executable)
@@ -1,5 +1,22 @@
 #!/usr/bin/env python
 
+#
+# THIS IS NO LONGER SUPPORTED
+#
+print """
+This script no longer works after the geocaching.com website update see:
+ http://blog.geocaching.com/2011/05/preview-of-geocaching-com-may-4th-website-release/
+
+It is now recommended to use the geo-* tools instead:
+ http://geo.rkkda.com/
+"""
+import sys
+sys.exit(1)
+
+#
+# One day this script could be resurrected, as the geo-* tools are not perhaps the fastest...
+#
+
 #
 # gcget -- screen scrape Geocaching.com's annoying web interface
 #         aka SHOW ME THE CACHE!!!
@@ -69,10 +86,11 @@ if len(args) < 2:
   sys.exit()
 
 #########################
-
-ll = args[0].split(",")
-lat = ll[0]
-lon = ll[1]
+#ll = args[0].split(",")
+#lat = ll[0]
+#lon = ll[1]
+#The following line replaced the previous 3 lines.
+lat, lon = args[0].split(",")
        
 if len(args) >= 3:
   maxdist = args[2]
@@ -104,8 +122,9 @@ b=Browser()
 b.open("http://geocaching.com/seek/")
 b.follow_link(text="Log in")
 b.select_form(nr=0)
-b["myUsername"] = USER
-b["myPassword"] = PASS
+# The Username and Password fields on the Login form changed
+b["ctl00$ContentBody$myUsername"] = USER
+b["ctl00$ContentBody$myPassword"] = PASS
 b.submit()
 
 magicnumber = 0 # the ctl number of Next. get only once