Skip to content

Instantly share code, notes, and snippets.

@huitseeker
Created January 7, 2011 17:34
Show Gist options
  • Save huitseeker/769794 to your computer and use it in GitHub Desktop.
Save huitseeker/769794 to your computer and use it in GitHub Desktop.
Empty your save-for-later list on bookmooch
#!/usr/bin/python
import re
import mechanize
myuser = ""
mypassword = ""
br = mechanize.Browser()
br.add_password("http://bookmooch.com",myuser, mypassword)
br.set_handle_robots(False)
br.open("http://bookmooch.com/m/savelater/"+myuser)
while True:
try:
response1 = br.follow_link(url_regex=r"remove")
assert br.viewing_html()
print response1.geturl()
except Exception as e:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment