Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^6: web search for certain data

by pydi (Initiate)
on Nov 23, 2011 at 20:34 UTC ( [id://939734]=note: print w/replies, xml ) Need Help??


in reply to Re^5: web search for certain data
in thread web search for certain data

As i was telling i didnt have a worthy piece of code yet, but this is what i wrote so far, and when i run this, Mytempoutput file does not have all different meta content from the site.
use LWP::Simple; use HTML::Parse; #Parsing the http file for the required fields $url = 'http://content.karger.com/ProdukteDB/produkte.asp?Aktion=ShowA +bstract&ArtikelNr=6735&Ausgabe=224691&ProduktNr=223832'; $url =~ s/&/=/g ; my @url_mod = split('=', $url); #checking for url and increasing article no. if ($url_mod[5] = 224691) { open(Mytempoutput, ">tempoutput.txt"); print Mytempoutput (get $url); $abs_str=""; $aa[5]= $aa[5]+1; print $aa[5]; }

Replies are listed 'Best First'.
Re^7: web search for certain data
by Corion (Patriarch) on Nov 23, 2011 at 20:37 UTC

    So, do you like playing 20 Questions?

    As my next question, I choose: "What parts of the page(s) are missing?"

      I am so sorry, i never meant to beat the bush around. Its just that this thing is gettin on my nerve. Well the ans for your last question is i get <META NAME="TITLE" CONTENT="Karger Publishers" /> when i should get <META NAME="TITLE" CONTENT="Effects of Body Position on the Carbon Monoxide Diffusing Capacity in Patients with Chronic Heart Failure: Relation to Hemodynamic Changes" /> Thats all is my problem

        What is this line supposed to do:

        $url =~ s/&/=/g ;

        Are you sure that you want to replace all & in your URL with =? If I remove that line, and much other unnecessary cruft, I see the complete HTML and especially also the relevant META tags:

        use strict; use LWP::Simple; #Parsing the http file for the required fields my $url = 'http://content.karger.com/ProdukteDB/produkte.asp?Aktion=Sh +owAbstract&ArtikelNr=6735&Ausgabe=224691&ProduktNr=223832'; #$url =~ s/&/=/g ; #my @url_mod = split('=', $url); #checking for url and increasing article no. warn "Downloading $url"; my $html = get $url; print $html;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://939734]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-23 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found