This web site creates a *popup window* => how fetch contents in a script?

G

Gabriel Genellina

En Tue, 06 Mar 2007 03:18:23 -0300, (e-mail address removed)
The following web page puts a report in a *popup window* by clicking
the "Generate Report" button....

http://moneycentral.msn.com/investor/research/printrep.asp?Symbol=BBBY

How can I grab this pop window page in a python script? (It doesn't
seem to have a URL!?!)

Of course it has:
http://moneycentral.msn.com/investor/research/sreport.asp?Symbol=BBBY&Y1=1&CR=1&Type=Equity
If your browser don't let you know the actual URL... try a better browser
:)
 
P

Paul Rubin

Sure I can grab the aforementioned URL's contents but what about the
NEW contents in the NEW popup window that appears AFTER you press some
form buttons? How grab *that* ?

Usually it's from some fixed url with possibly some query parameters.
Just figure out the url from your "Properties" in your browser, or by
studying the javascript that popped up the window. There are various
ways the popup sites can make this difficult but it's rare for them
to bother.
 
G

Gabriel Genellina

En Tue, 06 Mar 2007 17:02:00 -0300, (e-mail address removed)
Sure I can grab the aforementioned URL's contents but what about the
NEW contents in the NEW popup window that appears AFTER you press some
form buttons? How grab *that* ?

The above URL corresponds to the "NEW popup window that appears AFTER you
press some form buttons". In particular, that is what you get if you press
the "simple report" button (or something like that, I don't remember, and
if even you don't care to check it, me neither).

Anyway, I can think of 3 ways to get the info you want:
- select some options, try some buttons, and notice the URL on the
generated popup window. Luckily it's an HTTP GET and that URL is the only
info you need. (Again: if your browser isn't able to show you the URL, get
a better one!)
- same as above, but using a protocol sniffer to record the HTTP
requests/responses. This may be needed if HTTP POST is used instead.
- study the HTML+javascript code.
 
P

Paul Rubin

Gabriel Genellina said:
- same as above, but using a protocol sniffer to record the HTTP
requests/responses. This may be needed if HTTP POST is used instead.

Usually studying the originating page is enough, or at worst use a
client side proxy to log the http session. A protocol sniffer sounds
like too much trouble and I've never needed to resort to one for
something like this.
 
S

seberino

Usually it's from some fixed url with possibly some query parameters.
Just figure out the url from your "Properties" in your browser, or by
studying the javascript that popped up the window. There are various
ways the popup sites can make this difficult but it's rare for them
to bother.


I wanted to make sure to thank you and everyone else for the help.
Indeed this revealed the URL.
I just acted like I wanted to make the mystery URL my home page and it
manifested itself.

Thanks again all,

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top