<div>Hypothetically speaking, of course, suppose one had the code below. And that person was having difficulty retrieving the file that would normally popup in a download window when using a browser.<br><br>When one looks at the $response->content from the bottom of the code it only contains the HTML from the page.<br>
<br>How would one fix the code and retrieve the download file?</div>
<div> </div>
<div>Thanks</div>
<div>Jay<br><br>#!/usr/bin/perl<br><br>use strict;<br>use LWP::UserAgent;<br>use HTML::Form;<br>use Data::Dumper;<br><br>my $url = '<a href="http://www.cboe.com/DelayedQuote/QuoteTableDownload.aspx" target="_blank">http://www.cboe.com/DelayedQuote/QuoteTableDownload.aspx</a>';<br>
my $browser = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)';<br>my $symbol = "QQQQ";<br><br>my $ua = LWP::UserAgent->new;<br><br>$ua->agent($browser);<br>push @{ $ua->requests_redirectable }, 'POST';<br>
<br>my $response = $ua->get($url);<br><br>my @forms = HTML::Form->parse($response);<br><br>my $form = $forms[0];<br><br>$form->value('ucQuoteTableDownloadCtl:txtTicker' => $symbol);<br><br>$response = $ua->request($form->click);<br>
<br><br></div>
<div class="gmail_quote">On Mon, Jul 6, 2009 at 10:40 PM, Jay Strauss <span dir="ltr"><<a href="mailto:me@heyjay.com" target="_blank">me@heyjay.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>Hi,</div>
<div> </div>
<div>I want to download equity option data (like price, strike, expiration...)</div>
<div> </div>
<div>On the CBOE's web page for delayed quotes they have the following disclaimer:</div>
<div> </div>
<div><font size="1">"PLEASE NOTE: IT IS STRICTLY PROHIBITED TO DOWNLOAD DELAYED QUOTE TABLE DATA FROM THIS WEB SITE BY USING AUTO-EXTRACTION PROGRAMS/QUERIES AND/OR SOFTWARE. CBOE WILL BLOCK IP ADDRESSES OF ALL PARTIES WHO ATTEMPT TO DO SO. THIS DATA IS PROPERTY OF THOMSON FINANCIAL/ILX. DOWNLOADING THIS DATA IN ANY OTHER WAY THAN BY MANUAL TICKER SYMBOL ENTRY IS STRICTLY PROHIBITED"</font></div>
<div> </div>
<div>Once they put it on the web isn't the data public domain? Isn't this really just scare language?</div>
<div> </div>
<div>Thanks</div>
<div>Jay</div></blockquote></div><br>