Finding the feeds of a show from what a listener types or pastes: the URL of a feed, a domain, the address of a web page or a link of an app.
The candidates are found as the feed finders of RSS readers find them, and ranked with the podcasts first, and then by where they were found. Each feed comes once, however many places name it.
Finding the feeds of a show from what a listener types or pastes: the URL of a feed, a domain, the address of a web page or a link of an app. The candidates are found as the feed finders of RSS readers find them, and ranked with the podcasts first, and then by where they were found. Each feed comes once, however many places name it.
(candidate url where feed)The candidate of the parsed feed at url, found at the place where:
a map of the :url, the :title, :found-by, :podcast? and the :feed.
The candidate of the parsed `feed` at `url`, found at the place `where`: a map of the :url, the :title, :found-by, :podcast? and the :feed.
The limits of a search for feeds when its options don't set them:
The limits of a search for feeds when its options don't set them: - :timeout-seconds, how long a request can take - :guess-timeout-seconds, how long a request for a guessed path can take, since a slow server is slow to say 404 too - :max-bytes, the most bytes of a page or a feed - :max-candidates, the most candidates of one kind to fetch, such as the links of a page
(feed-anchors s base)The addresses that the a elements of the web page s link to and that
look like feeds, made absolute against base, the URL of the page.
An address looks like a feed when it has the word rss, feed, feeds, atom or xml in it. Those on the domain of the page come first, in the order of the page, as in the feed finders of RSS readers.
The addresses that the a elements of the web page `s` link to and that look like feeds, made absolute against `base`, the URL of the page. An address looks like a feed when it has the word rss, feed, feeds, atom or xml in it. Those on the domain of the page come first, in the order of the page, as in the feed finders of RSS readers.
(feed-document? s)Whether the text s is a feed rather than a web page, by its first
element, as the feed finders of RSS readers sniff it. The element must
start in the first 4 KB.
Whether the text `s` is a feed rather than a web page, by its first element, as the feed finders of RSS readers sniff it. The element must start in the first 4 KB.
(feed-links s)(feed-links s base)The feeds that the web page s names, in the order of the page. When
the URL of the page is given as base, each href is made absolute.
A feed is a map of :href, :type and :title. It comes from a link element with the rel alternate or feed and the type of an RSS or Atom feed. The type is without its parameters.
The base element of the page replaces base, as in a browser. With a
base, only an http or https URL is a feed. Without one, a relative href
stays as it is.
The feeds that the web page `s` names, in the order of the page. When the URL of the page is given as `base`, each href is made absolute. A feed is a map of :href, :type and :title. It comes from a link element with the rel alternate or feed and the type of an RSS or Atom feed. The type is without its parameters. The base element of the page replaces `base`, as in a browser. With a base, only an http or https URL is a feed. Without one, a relative href stays as it is.
(fetch-head! url)(fetch-head! url opts)Fetch the start of the feed at url with the opts of find-feeds!, as
far as the end of its first item, and give a map of the :url that it was
found at and the :feed, or of an :error. Deferred.
The start is enough to preview a show, or to check its guid before
subscribing, and most often it's the first 64 KB of a feed of megabytes.
RSS lets channel elements come after the items, so a start can lack
some, and head? tells it from a whole feed. When the start doesn't read
as a feed with a title, the whole feed is fetched, and a short feed comes
whole too. The :credentials of opts go with the requests.
Fetch the start of the feed at `url` with the `opts` of find-feeds!, as far as the end of its first item, and give a map of the :url that it was found at and the :feed, or of an :error. Deferred. The start is enough to preview a show, or to check its guid before subscribing, and most often it's the first 64 KB of a feed of megabytes. RSS lets channel elements come after the items, so a start can lack some, and head? tells it from a whole feed. When the start doesn't read as a feed with a title, the whole feed is fetched, and a short feed comes whole too. The :credentials of `opts` go with the requests.
(find-feeds! s)(find-feeds! s opts)Find the feeds of a show from the text s that a listener types or
pastes, with the opts below. It gives a map of the :feeds, best first,
as a promise in ClojureScript.
The text can be a feed URL, a domain, a web page or a link that an app shares. Each feed has its :url, :title, :found-by, :podcast? and the parsed :feed. Failures go in the :report, and the result has an :error when no feed is found.
The opts are:
Find the feeds of a show from the text `s` that a listener types or pastes, with the `opts` below. It gives a map of the :feeds, best first, as a promise in ClojureScript. The text can be a feed URL, a domain, a web page or a link that an app shares. Each feed has its :url, :title, :found-by, :podcast? and the parsed :feed. Failures go in the :report, and the result has an :error when no feed is found. The `opts` are: - :known, the feeds you already have, as a map of each to its URL - :search, the directories to search by a page's name, none by default - :lookup, the directories that look up the id in an app's link - :index, the Podcast Index credentials, and :now-fn, the clock to sign with - :rules, your rules for a page's address, as rule-urls takes them - :guessed-paths and :apps, in place of guessed-paths and directory.links/apps - :send, the function that sends a request, client/send! by default - :allow-pred, a predicate of the URLs a request may go to, url/public? by default - :timeout-seconds, :guess-timeout-seconds, :max-bytes and :max-candidates, over default-limits - :heads?, to fetch only the start of each feed that a page names, as fetch-head! does, e.g. to show the candidates before the listener chooses one - :user-agent, and the options of rss/parse
Where a candidate feed can be found, best first:
Where a candidate feed can be found, best first: - :input, the address that was given is the feed - :known, a feed that the caller knows, such as a subscription - :app-link, the feed that a link of an app holds or names by an id - :link, a link element of the page - :link-header, the Link header of the page - :anchor, a link in the page that looks like a feed - :rule, a rule of the caller for the address - :guess, a common path on the domain of the page - :directory, a directory search, whose feed names the domain as its website
The paths on the domain of a page that are tried when the page names no podcast feed. They're those of WordPress, of Libsyn and Ghost, of Jekyll and of Hugo.
The paths on the domain of a page that are tried when the page names no podcast feed. They're those of WordPress, of Libsyn and Ghost, of Jekyll and of Hugo.
(guesses url)(guesses url paths)The URLs of the paths on the domain of the page at url, or of the
common paths when none are given.
The URLs of the `paths` on the domain of the page at `url`, or of the common paths when none are given.
(head? feed)Whether feed is the start of a feed that fetch-head! gave, rather than
the whole feed.
Whether `feed` is the start of a feed that fetch-head! gave, rather than the whole feed.
(header-links headers base)The feeds that the Link header of the response headers names, made
absolute against base, the URL of the response. They're read as the
link elements of a page are.
The feeds that the Link header of the response `headers` names, made absolute against `base`, the URL of the response. They're read as the link elements of a page are.
(known-matches url known)The candidates among the known feeds that the web page url names.
The known feeds are a map of each parsed feed to its URL.
A feed is named by its URL, without the scheme, trailing slashes and case, or by its website.
The candidates among the `known` feeds that the web page `url` names. The `known` feeds are a map of each parsed feed to its URL. A feed is named by its URL, without the scheme, trailing slashes and case, or by its website.
(page-name s url)The name that the web page s at url gives itself, to search a
directory by.
A home page is named by its og:site_name, and another page by its og:title or title without the name of the site, since a show can have a page on the site of a network. Of a title such as Home | The Show, it's the longest part.
The name that the web page `s` at `url` gives itself, to search a directory by. A home page is named by its og:site_name, and another page by its og:title or title without the name of the site, since a show can have a page on the site of a network. Of a title such as Home | The Show, it's the longest part.
(ranked candidates)The candidates best first, with each feed once.
Podcasts come before other feeds, such as the feed of a blog or its comments. Then they're ordered by where they were found, the best place first, and otherwise they keep their order, which is that of the page. Two candidates are one feed when they share a URL or a self link, and the better one stays. The feeds of one show in two audio formats can share a podcast:guid, so they stay apart.
The `candidates` best first, with each feed once. Podcasts come before other feeds, such as the feed of a blog or its comments. Then they're ordered by where they were found, the best place first, and otherwise they keep their order, which is that of the page. Two candidates are one feed when they share a URL or a self link, and the better one stays. The feeds of one show in two audio formats can share a podcast:guid, so they stay apart.
(read-input s)(read-input s opts)Read the text s that a listener gives for a show, with the :apps of
opts, into a map of what to fetch, or of an :error.
The text can be a URL, a domain with or without a path, or a link of an app, whose table of apps the :apps replace. The schemes feed, itpc and pcast only mark a feed, so they're removed. The map has:
Read the text `s` that a listener gives for a show, with the :apps of `opts`, into a map of what to fetch, or of an :error. The text can be a URL, a domain with or without a path, or a link of an app, whose table of apps the :apps replace. The schemes feed, itpc and pcast only mark a feed, so they're removed. The map has: - :url, the URL to fetch, without its fragment - :typed?, when the text had no scheme, so https was added and http can follow - :ids, when the text is a link of an app that names the show by an id - :guid, the podcast:guid of a fast-follow link
(rule-urls url rules)The URLs that the rules of the caller give for url.
A rule is a pair of a regex and its replacement, as str/replace takes
them. It gives a URL when the regex matches url, e.g. this rule gives
the feed of a show from the address of its page on a host:
[#"^https://([a-z0-9-]+)\.host\.example/?$"
"https://feeds.host.example/$1.xml"]
The URLs that the `rules` of the caller give for `url`.
A rule is a pair of a regex and its replacement, as str/replace takes
them. It gives a URL when the regex matches `url`, e.g. this rule gives
the feed of a show from the address of its page on a host:
[#"^https://([a-z0-9-]+)\.host\.example/?$"
"https://feeds.host.example/$1.xml"](same-website? url link)Whether the web page url is on the website link: the same domain, in
any case and with or without www. When url has a path, link must
have the same path too, without trailing slashes.
Whether the web page `url` is on the website `link`: the same domain, in any case and with or without www. When `url` has a path, `link` must have the same path too, without trailing slashes.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |