Skip Menu |
 

This queue is for tickets about the URI-Title CPAN distribution.

Report information
The Basics
Id: 48231
Status: resolved
Priority: 0/
Queue: URI-Title

People
Owner: Nobody in particular
Requestors: ilmari+cpan [...] ilmari.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.82
Fixed in: (no value)



Subject: Add Spotify support [patch]
The attached patch adds support for spotify via the spotify.url.fi service.
Subject: spotify.diff
Download spotify.diff
text/x-diff 821b
--- lib/URI/Title.pm~ 2008-09-30 07:36:32.000000000 +0100 +++ lib/URI/Title.pm 2009-07-27 13:05:31.000000000 +0100 @@ -224,6 +224,9 @@ $data = 1; # we don't need it, fake it. } else { + # special case for spotify + $url =~ s{^(?:http://open.spotify.com/|spotify:)(\w+)[:/]} + {http://spotify.url.fi/$1/}; ($data, $cset) = get_limited($url); } } --- lib/URI/Title/HTML.pm~ 2008-05-22 16:46:16.000000000 +0100 +++ lib/URI/Title/HTML.pm 2009-07-27 13:09:22.000000000 +0100 @@ -73,6 +73,8 @@ # google can be used as a calculator. Try to find the result. $special_case = 'calc_img.*<td nowrap>(.+?)</td'; + } elsif ($url =~ /spotify\.url\.fi/) { + $special_case = '<title>\s*(.+?)\s+&mdash;\s+Decode\s+Spotify\s+URIs\s*</title>'; }
Download (untitled) / with headers
text/plain 177b
Awesome. Applied in http://github.com/jerakeen/URI- Title/commit/50defb854b8c898d3d3eb57dc928dc42a6db7d21 - I'll release a 1.84 once I've tried it in prod for a bit. Thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.