views:

100

answers:

2

Hello

I am trying to scrape a web page and to recieve the data i need to press a button. This is the source code for the button:

"a class="press-me_btn" href="javascript:void( NewPage['DemoPage'].startDemo() );" id="js_press-me_btn">PRESS ME

Is it possible to "press" the button somehow without using a browser? either by using wget with the --post-data argument or maybe a small python, ruby, perl etc. application?

Any ideas are appreciated!

+1  A: 

In this case these is not a button, it is an anchor element, i think that you will need to run the js code, that is in the href attribute:

javascript:void( NewPage['DemoPage'].startDemo() );
Thiago Diniz
A: 

We use iMacros for web scraping, it can press all kinds of buttons. It works from Perl, Ruby etc.

If on Linux, try the free/open source iMacros Firefox addon.

MikeK