简体   繁体   中英

Automating interaction with a web-page's JavaScript

Some websites, like rapidshare, give access to their content using JavaScript-based timers.
This is impossible to circumvent, for someone like me who doesn't really know how web browsers exactly work.

I'd be grateful if someone could provide me with a helpful article explaining how to handle this obstacle (scripts and cookies).



Editor's note: The title was "Automating server-side javascript", which is not technically correct based on the rest of the question. But I'm leaving the old title text here, in case other users search with the same notions in mind.

You want to change the way a web-site acts when you browse it, yes?

For this, use browser-scripting tools like Greasemonkey 1 .

Userscripts.org has a collection of scripts that work for a variety of sites -- including scripts for, say, Rapidshare .

Find a script that does what you want, or tweak a script that's close.
You can sometimes talk people on the Userscripts.org forum into writing new scripts, and SO (here) can help with specific script programming questions.


1 Greasemonkey is mainly for Firefox, but works to various degrees on Chrome, Opera, Safari, and even IE (very limited). GM scripts work fairly well on Chrome -- especially when using theTampermonkey extension .

Javascript is a client-side technology. For server-side, you need something like JSP, ASP, or PHP. These require a web server to host the pages, which process the results and display the generated output to the browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM