basskozz
asked on
Perl Scrape Script
I need a script that will scrape the following site:
http://www.baystateauction.com/auction_list.htm
Information contained with in the "Current Auctions" frame...
and Export to MS Excel file, with the fields :
Status, Date, Time, Address, Notes, Other Notes (postponed info, etc...)
-BassKozz
http://www.baystateauction.com/auction_list.htm
Information contained with in the "Current Auctions" frame...
and Export to MS Excel file, with the fields :
Status, Date, Time, Address, Notes, Other Notes (postponed info, etc...)
-BassKozz
ASKER
ozo,
It's NOT pulling the Town Name for each listing.
Example of what it is pulling:
Foreclosure Auction/Monday March 7th, 2005/12:00 PM/447 Winslow Gray Road/(THE SALE IS CANCELLED)
Example of what is needed to pull:
Foreclosure Auction/Monday March 7th, 2005/12:00 PM/447 Winslow Gray Road/(THE SALE IS CANCELLED)/So. Yarmouth, MA
It's NOT pulling the Town Name for each listing.
Example of what it is pulling:
Foreclosure Auction/Monday March 7th, 2005/12:00 PM/447 Winslow Gray Road/(THE SALE IS CANCELLED)
Example of what is needed to pull:
Foreclosure Auction/Monday March 7th, 2005/12:00 PM/447 Winslow Gray Road/(THE SALE IS CANCELLED)/So. Yarmouth, MA
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Awsome ozo,
I did some tweaking:
use LWP::Simple;
open OUT, "> BayState.csv" || die "couldn't open output file";
$_=get 'http://www.baystateauction.com/auction_list.htm';
print OUT qq("$1","$2","$3","$4","$5 ","$6","$7 "\n) while m
{
<table[^<>]*>.*?
<b>(.*?)</b>.*?
<b>(.*?) .*? \s* (.*?)</b>. *?
<p><b>(.*?)<b>(?:<br>([^<> ]*?))?<br> (.*?)\s*,\ s* \s *(.*?)</p> .*?
</table>
}xsg;
Works Great !!!
Thanks
I did some tweaking:
use LWP::Simple;
open OUT, "> BayState.csv" || die "couldn't open output file";
$_=get 'http://www.baystateauction.com/auction_list.htm';
print OUT qq("$1","$2","$3","$4","$5
{
<table[^<>]*>.*?
<b>(.*?)</b>.*?
<b>(.*?) .*? \s*
<p><b>(.*?)<b>(?:<br>([^<>
</table>
}xsg;
Works Great !!!
Thanks
ASKER
I have another one that I need help on:
https://www.experts-exchange.com/questions/21341458/Perl-Scrape-Script-Excel.html
Maybe instead of just righting the scripts, can you point me in the right direction of a Beginners guide to using PERL & LWP::Simple, so that I can create them on my own.
Or if you'd rather create them I'd Appreciate it.
Thanks for all your help ozo
-BassKozz
https://www.experts-exchange.com/questions/21341458/Perl-Scrape-Script-Excel.html
Maybe instead of just righting the scripts, can you point me in the right direction of a Beginners guide to using PERL & LWP::Simple, so that I can create them on my own.
Or if you'd rather create them I'd Appreciate it.
Thanks for all your help ozo
-BassKozz
see
perldoc perlre
perldoc perlre
$_=get 'http://www.baystateauction.com/auction_list.htm';
print qq("$1","$2","$3","$4","$5
{
<table[^<>]*>.*?
<b>(.*?)</b>.*?
<b>(.*?) .*? \s*
<p><b>(.*?)<b>(?:<br>([^<>
</table>
}xsg;