Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Extract data from website and transfer it to Outlook

by Anonymous Monk
on Apr 29, 2006 at 03:49 UTC ( #546459=note: print w/replies, xml ) Need Help??


in reply to Extract data from website and transfer it to Outlook

I have done a couple of web sites like this. I did not use WWW::Mechanize, but instead LWP::Simple or LWP::UserAgent, and HTML::TokeParser; HTML::LinkExtractor; no one showed me how to do this, I just did some reading and tried it.

I also have no problem breaking it up into steps. As in, get some data in a format, then use my trusty text editor with Grep expressions to reform the data lines, then back to a perl script to put it somewhere.

In several cases, I looked at the URL that gets me a page of data, then made a list of values to substitute into that URL, then ran a perl script to do it and catch the result. e.g. www.academicsFlow.edu/greatBooks.php?item=1
then looped with values 1 through 99 inserted in that line
If there is a nested link(s) I want to get, I might write a loop that uses the simple mode of LinkExtractor, iterating from one HREF to the next, and saving the results in seqentially named text files.

Then I run through the text files, open each one, and write a simple state machine loop that has a bunch of hard coded knowledge of the format of the page to look for and extract the data fields. Not generalized, not pretty, but works for the task. I write out each of the values in say a tab-delimitted format I have defined.

Lastly, I read in the tab delimited file into whatever target DB, like Outlook I suppose. THough I have not gone there :-)

hth
  • Comment on Re: Extract data from website and transfer it to Outlook

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://546459]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2018-07-21 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (443 votes). Check out past polls.

    Notices?