Welcome to the North American Subaru Impreza Owners Club Sunday November 3, 2024
Home Forums Images WikiNASIOC Products Store Modifications Upgrade Garage
NASIOC
Go Back   NASIOC > NASIOC General > Motorsports

Welcome to NASIOC - The world's largest online community for Subaru enthusiasts!
Welcome to the NASIOC.com Subaru forum.

You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, free of charge, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, so please join our community today!

If you have any problems with the registration process or your account login, please contact us.







* As an Amazon Associate I earn from qualifying purchases. 
* Registered users of the site do not see these ads. 
Reply
 
Thread Tools Display Modes
Old 03-20-2003, 11:22 PM   #1
Sean
Scooby Guru
 
Member#: 518
Join Date: Nov 1999
Chapter/Region: NESIC
Location: Pelham, NH USA
Vehicle:
762 PGT Impreza L,
Elantra GT Sport

Default RSS newsfeed created for SpecialStage.com now available on Trunkmonkey.com.

Since SpecialStage.com didn't have an RSS newsfeed available I set up a scraper to pull headlines off their news archive page and convert them to an RSS feed. The feed info is available at Syndic8:

http://www.syndic8.com/feedinfo.php?FeedID=24781

The actual scraped RSS feed is available at Trunkmonkey.com:

http://www.trunkmonkey.com/feeds/specialstagenews.xml

To see the feed in action, check out Trunkmonkey.com, scroll down and check out the Special Stage News block on the left. If you run a CMS like PostNuke, Movable Type, Blogger, etc. you can add RSS newsfeeds to your Web site! If you want to add the Special Stage RSS newsfeed to your site, feel free to point your scripts at my scraped feed!

Team Updates | FAQ | Gallery | Birth

For the geeks among you, here is the code if you want to scrape it yourself or set up a scraper for another site (you'll need to tweak it to match the site's HTML):

Code:
#!/usr/bin/perl

use strict;
use LWP::Simple;
use HTML::TokeParser;
use XML::RSS;
use CGI;

my $content = get( "http://www.specialstage.com/viewall2.asp" ) or die $!;
my $stream = HTML::TokeParser->new( \$content ) or die $!;
my $rss = XML::RSS->new( version => '0.9' );

$rss->channel(title       => "www.specialstage.com",
              link        => "http://www.specialstage.com/",
              description => "SpecialStage.com - The North American Rally Resource",
              language    => "en-us");

$rss->image(title => "specialstage.com",
            url   => "http://www.specialstage.com/images/header.jpg",
            link  => "http://www.specialstage.com/");

my ($tag, $headline, $url);

$tag = $stream->get_tag('strong');
$tag = $stream->get_tag('/p');

# First indication of a headling - A <strong> tag.

while ( $tag = $stream->get_tag("a") ) {
    $url = $tag->[1]{href} || "--";
    if ( $url =~ /StoryID/ ) {
        $headline = $stream->get_trimmed_text('/a');
#       $headline = CGI::escape($headline);
        $url = 'http://www.specialstage.com/'.$url;
        $url = CGI::escapeHTML($url);
        $rss->add_item( title => $headline, link => $url);
    }
}

$rss->save("/var/www/html/www.trunkmonkey.com/feeds/specialstagenews.xml");
* Registered users of the site do not see these ads.
Sean is offline   Reply With Quote
Sponsored Links
* Registered users of the site do not see these ads.
Old 03-21-2003, 11:52 AM   #2
spanner
Scooby Specialist
 
Member#: 18791
Join Date: May 2002
Chapter/Region: MWSOC
Vehicle:
2002 WRX wagon
Silver!

Default

Sweet!

I just set my personal PHPws setup to pull it.
It's about time I got it doing something useful...

-Mark
spanner is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2006 Impreza, Legacy, and Outback brochures now available at Subaru.com Raxy General Community 5 11-01-2005 10:43 PM
Picasa now available on Google -=C=- Off-Topic 7 06-07-2005 03:16 PM
STi now available at Subaru.com MK19 STi Forum Archive 3 05-21-2003 03:15 PM
('93-'01) Starting my photography portfolio on Trunkmonkey.com...comments/suggestions please! Sean Impreza Forum 7 05-24-2001 01:39 AM

All times are GMT -4. The time now is 06:24 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Copyright ©1999 - 2019, North American Subaru Impreza Owners Club, Inc.

As an Amazon Associate I earn from qualifying purchases.

When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission
Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.