Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/book/uri-title
Get the titles of things on the web in a sensible way
https://github.com/book/uri-title
Last synced: 3 months ago
JSON representation
Get the titles of things on the web in a sensible way
- Host: GitHub
- URL: https://github.com/book/uri-title
- Owner: book
- Created: 2014-02-03T21:57:38.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-02-16T14:52:52.000Z (11 months ago)
- Last Synced: 2024-10-03T12:36:18.745Z (4 months ago)
- Language: Perl
- Size: 89.8 KB
- Stars: 3
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
URI::Title - get the titles of things on the web in a sensible wayDESCRIPTION
I keep having to find the title of things on the web. This seems like a
really simple request, just get() the object, parse for a title tag,
you're done. Ha, I wish. There are several problems with this approach:What if the resource is on a very slow server? Do we wait for ever or what?
What if the resource is a 900 gig file? You don't want to download that.
What if the page title isn't in a title tag, but is buried in the HTML somewhere?
What if the resource is an MP3 file, or a word document or something?
...So, let's solve these issues once.
METHODS
only one, the title(url) method. Call it with an url, get the title if
possible, undef if it wasn't. Very simple.AUTHORS
Tom Insam , original author, 2004-2012.Philippe Bruhat (BooK) , maintainer, 2014.
LICENSE
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.