xtina: (Default)
Xtina ([personal profile] xtina) wrote2017-04-10 03:24 pm

Selenium IDE script for overwriting and deleting.

I have put together a Selenium IDE script to overwrite previous entries, then delete them, individually. It takes a long while, but if you're looking with interest at this script, you probably already knew it wasn't gonna be swift.

You will need to agree to the TOS for this to work. There is no getting around that that I'm aware of. Sorry about that.

Details below the cut.


  • Firefox is required.

  • Install the Firefox add-on Selenium IDE and restart Firefox.

  • Install the Selenium plugin Flow Control and restart Firefox.


The script is located here. To install:

  • Open Firefox.

  • Open Selenium IDE.

  • In the new window, click the Source tab.

  • Delete everything out.

  • On the gist script page, click "Raw".

  • Copy everything on that page into the Source tab.

  • Click the Table tab in Selenium.

You'll need to add your username and password so that the script can log in as you. This is NOT stored anywhere on the internet! All local, all the time. 🤘

  • At the top of the script, select the line that reads:

    store   your-username   username

  • In the bottom pane, you'll see three fields: Command, Target, and Value. In the Target field, change the text from your-username to your actual username.

  • Follow the same steps for the password line.

  • Follow the same steps for the customText line.

Run that thing

To run the script, click the green Play button at the top, or go to Actions > "Play current test case".

What it does:

  1. Logs into LJ on your behalf.

  2. Goes to your main journal page.

  3. For every entry, it overwrites the entry body with your own text, changes the setting to private, saves, then deletes the entry.

Thing to know:

You can't use Firefox while this is running. Ideally you have access to another browser.

I also have a total hax for the Python package "lj"... I'll put that up later.

Sharing is fine.
emceeaich: A woman in glasses with grey hair, from the eyes up, wearing a hairband with 'insect antenna' deelie-boppers (bugmaster)

[personal profile] emceeaich 2017-04-11 06:44 pm (UTC)(link)
* I love this unanticipated use of Selenium! +1

* If you're comfortable creating and managing multiple Firefox profiles, you can run the Selenium script in a separate Firefox instance. If you want to try that, see https://www.howtogeek.com/209320/how-to-set-up-and-use-multiple-profiles-user-accounts-in-firefox/

jamoche: Prisoner's pennyfarthing bicycle: I am NaN (Default)

[personal profile] jamoche 2017-04-12 07:58 am (UTC)(link)
Got this from copperbadge - you can duck the TOS with Adblock, it's just an overlay. Add this to the custom Adblock list:

jasra: (Default)

[personal profile] jasra 2017-04-14 04:43 pm (UTC)(link)
Thank you for this!
xochiquetzl: Claudia from Warehouse 13 (Default)

[personal profile] xochiquetzl 2017-04-18 03:20 am (UTC)(link)
Thank you so much for sharing this script!

I'm running it in a VM. Microsoft gives away free VMs for testing.
aedifica: Silhouette of a girl sitting at a computer (Girl at computer)

[personal profile] aedifica 2017-04-24 02:24 am (UTC)(link)
Thank you for this!

Do you know off the top of your head if there's a way to mass delete comments (other than by deleting the entries the comments are on)? I'm not worried about comments I've left in other journals, but I'm thinking about overwriting my entries without deleting them, and don't want to leave my friends' comments hanging around if I do that. If you don't know, I'll go digging to see if I can find it--but I thought it worth asking in case you do happen to know.

(waves hi from slack)