Question

So I've been trying to create a script that clears all my activity on Facebook by going to the activity log and clicking all the buttons to either delete, or if it can't hide, all posts. Mechanize allows me to log into my account, and navigate to the page. Once there though, clicking the buttons is difficult, since they use javascript. I've heard spidermonkey works well for evaluating javascript, but I was wondering how you could patch it onto mechanize so that it will work with the AJAX Facebook uses.

Was it helpful?

Solution

You might be better off using Selenium to instrument a normal browser and do what you want.

It's probably possible to use spidermonkey to evaluate javascript, or do something with node.js, but my guess is it would be more complicated and more brittle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top