473,406 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Need to scrape the data from aspx webpage

Hi All,

I need to scrape the data from the URL "https://hms.portxcs.nl/oper/Public/PublicMovements.aspx".

Here we give the dropdown box for "Time" should be "Next 7 Days" and "Port" should be "Vlissingen" Finally click the "Search" button.

Web page shows some records about the given credentials. I want to scrape that datas.

I used the below mentioned code to scrape.

my $inurl="https://hms.portxcs.nl/oper/Public/PublicMovements.aspx";
my $inurl1 = $inurl;

## Here we get the name of the button and value of the text box.
my $searchform = 'aspnetForm';
my $searchfield = 'ctl00$MP$GPSearchFrame$fldTIME$listComboBox';
my $searchterm = 'Next 7 Days';
my $searchfield1 = 'ctl00$MP$GPSearchFrame$fldPORT$listComboBox';
my $searchterm1 = '2';

my $searchbutton = 'ctl00$MP$GPSearchFrame$btnSearchBy';
# turn on perl's safety features
our $agent = WWW::Mechanize->new( autocheck => 1 );
$agent->get($inurl);
$agent->form_name($searchform);
$agent->field($searchfield, $searchterm);
$agent->field($searchfield1, $searchterm1);
$agent->click($searchbutton);

my $content = $agent->content();

open(FH,">$outfile")|| die("Cannot Open File");
binmode(FH, ":utf8");
print FH $content;
close FH;

But its provide only the firstpage data.

I have attached the screenshot for your reference.

Kindly let me know.

Regards,
Ram
Attached Images
File Type: jpg checkdet.jpg (95.4 KB, 412 views)
Feb 3 '12 #1
1 3123
chorny
80 Expert
HTML::TreeBuilderX::ASP_NET may help you.
Feb 5 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Pete..... | last post by:
Hi all. I have made a webpage where there is a webform where people can fill in their personel information: The code is below: I want to transfer the data to a postgreSQL database ( I have...
1
by: teknowbabble | last post by:
I would like to know how to convert HTML code that users input into a TEXTAREA box on a HTML FORM into a separate WEBPAGE. I have something like the diagram below on my webpage. The user is...
1
by: Mortel | last post by:
Hi, I want get data about authors from page. I can look for authors but only on the page. How I can do that ? How I can check this site if it has WebService etc .. ? I need that information....
1
by: Jim Bayers | last post by:
Our network nazi doesn't want us running a webserver on the server that has a connection to the campus database so we created a remote object that runs as a windows service. The windows service...
2
by: Ben | last post by:
Hi I have the two funcions below, login_web that posts data to a webpage and fcn_parseviewstate that parses the viewstate data for the post. I have a problem with the strPostData, I have been...
6
by: shivavrata | last post by:
Hi All, I want to transfer the data form webpage to any other own application which is running in backend.How i develop this web page. which technology is good for this or any particular protocol...
5
by: Rishika14 | last post by:
Hi, Somebody pls tell me how to export data from webpage to excel sheet using java script. rishika
15
by: Peter | last post by:
I have the following web page and I am trying to have the Field lables NOT to wrap. It looks fine in a designer but when I run the program in a browser the lables that have a space wrap. How do I...
0
by: Parameswar Nayak | last post by:
I have two same tables having same fields but table names are dirrerent.In a report I need all data from the two tables using a dataset in asingle table.So i can pass it to crystal report
0
by: naveen krishnan | last post by:
Using vb.net i need to get the value from webpage content and it has to be saved in excel file. The page source as follows <tr> <td class="data"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.