From: Jean Louis <bugs@gnu.support>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: To fetch URL, extract <title> element?
Date: Wed, 11 Nov 2020 21:04:38 +0300 [thread overview]
Message-ID: <X6wntvKmc5LtYuiO@protected.rcdrun.com> (raw)
In-Reply-To: <87zh3nc3r4.fsf@web.de>
* Michael Heerdegen <michael_heerdegen@web.de> [2020-11-11 18:29]:
> Jean Louis <bugs@gnu.support> writes:
>
> > What is the standard built-in way to fetch the http[s] URL?
>
> `url-retrieve' sounds appropriate.
I am trying like this:
(defun wrs-fetch-title (url)
(url-retrieve url #'wrs-get-title (list url)))
(defun wrs-get-title (status url)
(message-any status))
(wrs-fetch-title "http://localhost")
At least I get status nil, but I do not know how to get the HTML
text. Yes, I am looking into eww but it is not enlightening.
> If I understand what you want correctly, eww seems to get the title with
> `eww-tag-title'
That somehow sounds easier to do. To get HTML or any text is first
priority.
That will help in Hyperscope to automatically update WWW links with
their titles provided that content-type is HTML.
next prev parent reply other threads:[~2020-11-11 18:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 9:28 To fetch URL, extract <title> element? Jean Louis
2020-11-11 15:27 ` Michael Heerdegen
2020-11-11 18:04 ` Jean Louis [this message]
2020-11-12 12:56 ` Michael Heerdegen
2020-11-12 13:20 ` Jean Louis
2020-11-12 14:49 ` Yuri Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=X6wntvKmc5LtYuiO@protected.rcdrun.com \
--to=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).