473,401 Members | 2,139 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,401 software developers and data experts.

LWP - Slurp the links of a webpage?

Hi again. I used LWP to download a html page. That page has over 140 links on it. What I am trying to do is get Perl to go through the main page and go to the links and download there info too. Thanks
Aug 26 '07 #1
7 1780
numberwhun
3,509 Expert Mod 2GB
Well, it depends, if you are just looking to download the HTML page itself, then you may want to check out the LWP::Simple package, instead of plain old LWP.

Why don't you post the code you are trying and describe what your goal(s) are and we can help you from there.

Regards,

Jeff
Aug 26 '07 #2
Ok.
I Alreadly have the page downloaded. It is this
If you look on that site, it has prior years, like 2005. When you click that link it goes to another page that has a list of players. When you click on a player it has all there info. What I want perl to do is download that page for all the players for all teh years.
thanks
Aug 26 '07 #3
KevinADC
4,059 Expert 2GB
Herding cats Jeff, good luck ;)
Aug 27 '07 #4
numberwhun
3,509 Expert Mod 2GB
Ok.
I Alreadly have the page downloaded. It is this
If you look on that site, it has prior years, like 2005. When you click that link it goes to another page that has a list of players. When you click on a player it has all there info. What I want perl to do is download that page for all the players for all teh years.
thanks
Why is it things are never as simple as when you first explain them. I am no LWP expert. I have used it to download a page, parse out some info and use that elsewhere. If I were posed with this situation, I would download the page, as you have done, then parse out the subsequent links that you want (possibly loading them into an array), and then using LWP's get function once again to cycle through the array, downloading each link. Basically, you will have copies of the HTML. From there, you can use those pages to display the information any way you like.

Unless someone knows of a better way to do this, you are going to be writing a fair amount of code for this.

Regards,

Jeff

***Meeeooowww***
Aug 27 '07 #5
Sorry Jeff, but I don't know how to do what you said. I tryied reading the LWP page, but I try again. Thanks
Aug 27 '07 #6
KevinADC
4,059 Expert 2GB
look into WWW::Mechanize, which I think can be "told" to follow links. But I have little practical experience using the module so I will not be able to help with code.
Aug 27 '07 #7
I was at Perl Monks and have learned a little on Mech. Could anyone here give me some more info
Aug 27 '07 #8

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

Similar topics

9
by: Steve | last post by:
Hello, I am writing a script that calls a URL and reads the resulting HTML into a function that strips out everthing and returns ONLY the links, this is so that I can build a link index of various...
7
by: Chris | last post by:
I'm using eight links listed horizontally as a menu on my site. I'm using font-variant:small-caps and they are padded so that they mimic buttons. My gripe is with the way IE handles the focus...
18
by: Jan Tuxen | last post by:
Jakob Nielsen in his most recent Alertbox (http://www.useit.com/alertbox/20040503.html) tells web authors to change the color of visited links. I agree to his purpose: Help users understand...
9
by: Muffinman | last post by:
Hi, I have a webpage with two Iframe's. I want to be able to change the target of all links in one frame so it will point to the other frame and all this from the main page. Is this possible and...
1
by: craig.lloyd | last post by:
Hi all, Can anyone tell me how I can display details of the 3 most recently visited links onto my webpage... i.e. My webpage has many links off to various documents etc. I would like to place...
13
by: NoSpamThankYouMam | last post by:
I am looking for a product that I am not sure exists. I have bookmarks to webpages in Internet Explorer, Mozilla Firefox, Opera, Netscape Navigator, and on a "Favorite Links" page on my website....
7
by: Patrick Olurotimi Ige | last post by:
I have a simple Stored Procedure with multiple select statements..doing select * from links for example. I created a DataTable and then fill the tables But the first dtTemplate DataTable doesn't...
5
by: Kruegy Man | last post by:
I have a WinForm application that has a WebBrowser Control. I can navigate to any website fine. I want to store the link addresses in an array to be called back later. For example, if I...
6
by: Jetus | last post by:
Is there a good place to look to see where I can find some code that will help me to save webpage's links to the local drive, after I have used urllib2 to retrieve the page? Many times I have to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.