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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top