Skip to content

Instantly share code, notes, and snippets.

@mjgardner
Last active August 23, 2021 03:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjgardner/9edadb77708908a4aae0d12de44b458d to your computer and use it in GitHub Desktop.
Save mjgardner/9edadb77708908a4aae0d12de44b458d to your computer and use it in GitHub Desktop.
Rewrite of feed_finder.raku with XML::Feed
#!/usr/bin/env raku
use XML::Feed:from<Perl5>;
use URI:from<Perl5>;
sub MAIN($url = 'https://phoenixtrap.com') {
my @feeds = XML::Feed.find_feeds($url);
my $feed = XML::Feed.parse( URI.new( @feeds.first ) )
or exit note "Couldn't find a feed at $url";
put .title, "\t", .link for $feed.entries;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment