(This is obsolete: there is now a "Check All" button above the bookmark list.)

Are you:

If you said, "YES!" to any or all of these questions, then just copy the code below to your computer (make sure you have Python), fill in the values for your homenode id and login cookie where indicated, and experience freedom! I make it sound easy but it's really convoluted.

Your Homenode ID

Go to your homenode. Examine the "(edit user information)" link, either by mouse-over and observation of the status bar, or by right-click -> Properties -> Address. Whichever way you do it, you want to find something that looks like "http://everything2.com/index.pl?node_id=12345&displaytype=edit&lastnode_id=67890". The portion I have emphasized (the node id) is what you want to assign to YOUR_HOMENODE_ID in the script.

Your Login Cookie

This varies between browsers, but the idea is to find a list of the cookies on your machine, and then locate the "userpass" cookie set by everything2.com.

With Firefox 3, this can be found under the Tools menu -> Options... -> Privacy (tab) -> Show Cookies... (button). Then find everything2.com in the list and click the little plus sign. Then click on the line reading: "everything2.com ... userpass" and at the bottom of the window you should see something like "Content: yourname%cryptjunk"—this is what you should put into LOGIN_COOKIE.

The Code

import urllib2, re

LOGIN_COOKIE = 'yourname%cryptjunk'

# get all the bookmarks to remove

url = 'http://everything2.com/index.pl?node_id=%i&displaytype=edit' % YOUR_HOMENODE_ID
headers = {'Cookie': 'userpass=' + LOGIN_COOKIE}
req = urllib2.Request(url, None, headers)
html = urllib2.urlopen(req).read()
# file('removeBookmarks.get.htm', 'w').write(html) # for debugging
nodes_to_unbookmark = map(int, re.findall(r'"unbookmark_(\d+)"', html))
print 'found', len(nodes_to_unbookmark), 'nodes to unbookmark'

# create and submit the unbookmark request

url = 'http://everything2.com/index.pl?usereditpage=1'
post_data = 'displaytype=edit&node_id=%i' % YOUR_HOMENODE_ID
for id in nodes_to_unbookmark: post_data += '&unbookmark_%i=1' % id
req = urllib2.Request(url, post_data, headers)
html = urllib2.urlopen(req).read()
# file('removeBookmarks.set.htm', 'w').write(html) # for debugging

print 'done!'

Log in or register to write something here or to contact authors.