[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Emulate this POST with a script

BElow is the header information, as reported by Mozilla's Live Headers add-in,  that a successful POST uses to retrieve a page through a form.  I am trying to emulate this POST with a script -  Perl, PHP, Python, C# - I am trying to use Perl.  I have done this many times before to get data from web pages but cannot get this one to work.  Are there any web scraping/ spidering gurus out there who can crack this?

http://oas.zacks.com/pls/screnn/awi_report

POST /pls/screnn/awi_report HTTP/1.1
Host: oas.zacks.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://oas.zacks.com/pls/screnn/screening.show_categories?p_site_id=3&p_i=&p_o=&p_v=&p_comp_id=zcom2003&p_customer_id=
Cookie: ora_100m1.5k=6\20,21,24,25,115,30|select master_table.ticker,stock_data.EXCHANGE,stock_data.SECTOR_NAME,stock_data.X_IND,master_table.comp_name,prices.CLOSING from master_table,prices,stock_data where master_table.m_ticker=stock_data.m_ticker and master_table.m_ticker=prices.m_ticker AND upper(stock_data.MKT_VALUE) >= 100 AND upper(stock_data.VOLUME) >= 150000; TOTAL_POP=3; user_session=7a792c8b829032e1fc0d1a491b1e1927
Content-Type: application/x-www-form-urlencoded
Content-Length: 487
p_site_id=3&p_i=1&p_o=1&p_v=1&p_columns=1&p_comp_id=zcom2003&p_customer_id=&p_save_string=6%5C20%2C21%2C24%2C25%2C115%2C30%7Cselect+master_table.ticker%2Cstock_data.EXCHANGE%2Cstock_data.SECTOR_NAME%2Cstock_data.X_IND%2Cmaster_table.comp_name%2Cprices.CLOSING+from+master_table%2Cprices%2Cstock_data+where+master_table.m_ticker%3Dstock_data.m_ticker+and+master_table.m_ticker%3Dprices.m_ticker+AND+upper%28stock_data.MKT_VALUE%29+%3E%3D+100+AND+upper%28stock_data.VOLUME%29+%3E%3D+150000
0
pjsulin
Asked:
pjsulin
1 Solution
 
FishMongerCommented:
Based on the related question you posted last week, I'd say you should look at Perl's WWW::Mechanize module.

http://search.cpan.org/~petdance/WWW-Mechanize-1.18/lib/WWW/Mechanize.pm
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now