Gossamer Forum
Home : General : Perl Programming :

extract data from website using perl program

Quote Reply
extract data from website using perl program
hi,
can anyone tell how to extraxt data from website by writing Perl Program


rohit singh
IIT Kanpur
Quote Reply
Re: [rohitsg] extract data from website using perl program In reply to
Hi,

Erm, it depends on how/what you want to extract ;)

If its just the HTML from the page in question, you could use something like;

Code:
#!/usr/bin/perl

use LWP::Simple;
use CGI;

my $IN = new CGI;
my $url = $IN->param('url');

print $IN->header();
print get($url);

..and call with: http://www.domain.com/cgi-bin/script_name.cgi?url=http://www.test.com

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] extract data from website using perl program In reply to
hi,

actually first i want to go to page of pdb bank then after getting the pdb id of homo sapiens i want to extract

the "scop" data from SCOP database


rohit singh

IIT kanpur
Quote Reply
Re: [rohitsg] extract data from website using perl program In reply to
Sorry, that means absolutly nothing to me Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [rohitsg] extract data from website using perl program In reply to
If you're needing to navigate a site and fill in forms you'll probably need to use something like WWW::Mechanize[1].

~Charlie

[1] http://search.cpan.org/...lib/WWW/Mechanize.pm
Quote Reply
Re: [Andy] extract data from website using perl program In reply to
PDB = Protein Data Bank
SCOP = Structural Classification of Proteins

Biochemistry database of proteins.

----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln
Quote Reply
Re: [dan] extract data from website using perl program In reply to
Ahhh,.. thats why I didn't know what it was Blush

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [dan] extract data from website using perl program In reply to
can you tell us the web-site maybe with LWP module we can make something like get the html code near the part you want and store it and you can read it normally