Created
January 7, 2011 17:34
-
-
Save huitseeker/769794 to your computer and use it in GitHub Desktop.
Empty your save-for-later list on bookmooch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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