scrapefeed
ifThen -value1 {strLength {scrape -tokens %22%20type=%22application/rss href=%22 %22 -dirs 0 0 0 -url %s}} -value2 ${feedlength=20} -test GREATEREQUAL -then {scrape -tokens %22%20type=%22application/rss href=%22 %22 -dirs 0 0 0 -url %s} -else {ifThen -value1 {strLength {scrape -tokens %22%20type=%22application/rss href=%22 %22 -dirs 0 1 0 -url %s}} -value2 ${feedlength=20} -test GREATEREQUAL -then {scrape -tokens %22%20type=%22application/rss href=%22 %22 -dirs 0 1 0 -url %s} -else {ifThen -value1 {strLength {scrape -tokens %22%20type=%22application/atom href=%22 %22 -dirs 0 0 0 -url %s}} -value2 ${feedlength=20} -test GREATEREQUAL -then {scrape -tokens %22%20type=%22application/atom href=%22 %22 -dirs 0 0 0 -url %s} -else {ifThen -value1 {strLength {scrape -tokens %22%20type=%22application/atom href=%22 %22 -dirs 0 1 0 -url %s}} -value2 ${feedlength=20} -test GREATEREQUAL -then {scrape -tokens %22%20type=%22application/atom href=%22 %22 -dirs 0 1 0 -url %s} -else {ifThen -value1 {strLength {scrape -tokens xml href=%22 %22 -dirs 0 0 0 -url %s}} -value2 ${feedlength=20} -test GREATEREQUAL -then {scrape -tokens xml href=%22 %22 -dirs 0 0 0 -url %s} -else {ifThen -value1 {strLength {scrape -tokens xml href=%22 %22 -dirs 0 1 0 -url %s}} -value2 ${feedlength=20} -test GREATEREQUAL -then {scrape -tokens xml href=%22 %22 -dirs 0 1 0 -url %s} -else {ifThen -value1 {strLength {scrape -tokens rss href=%22 %22 -dirs 0 1 0 -url %s}} -value2 ${feedlength=20} -test GREATEREQUAL -then {scrape -tokens rss href=%22 %22 -dirs 0 1 0 -url %s} -else {ifThen -value1 {strLength {scrape -tokens rss href=%22 %22 -dirs 0 0 0 -url %s}} -value2 ${feedlength=20} -test GREATEREQUAL -then {scrape -tokens rss href=%22 %22 -dirs 0 0 0 -url %s} -else %s}}}}}}}[no url encoding]
NAME
scrapefeed - returns an RSS feed from a website.
SYNOPSIS
scrapefeed [ URL ] -feedlength [ MIN_LENGTH_OF_FEED ]
DESCRIPTION
scrapefeed attempts to return an RSS feed from a website. The only required
parameter is the URL of that site, but the feedlength argument may be
supplied to filter out links containing relative paths, etc.
EXAMPLES
Example: scrapefeed
Result: Returns nothing no URL was provided.
Example: scrapefeed http://www.linux.com
Result: Returns http://www.linux.com/feature/?theme=rss
Example: scrapefeed slashdot.org
Result: Returns http://rss.slashdot.org/Slashdot/slashdot
Example: scrapefeed {url /.}
Result: Also returns http://rss.slashdot.org/Slashdot/slashdot
Example: scrapefeed {url ls}
Result: Returns /stylesheets/yubnub.css
Example: scrapefeed {url ls} -feedlength 30
Result: Returns http://yubnub.org/commands.xml
Example: scrapefeed {url ifl jonathan aquino}
Result: Returns http://jonaquino.blogspot.com/feeds/posts/default?alt=rss
Example: yu scrapefeed singpolyma.net
Result: Might open up Stephen Paul Weber's feed in a browser window.
CREDITS
Wholly relies on Sean O'Hagan's scrape and Allen Ormond's ifThen command.
AUTHOR
Paul M. Boren
pmboren AT gmail DOT com
202 uses
-
Created 2008-09-01 07:27:08
-
Last used
2013-03-19 19:14:29