info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to access HTML DOM/source of MIME part?


From: Tim Landscheidt
Subject: Re: How to access HTML DOM/source of MIME part?
Date: Fri, 12 Jun 2020 00:04:22 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Eric Abrahamsen <eric@ericabrahamsen.net> wrote:

>> I am subscribed to several newsletters that are sent as
>> multipart/alternative with one part being text/html that
>> contains (inter alia) a list of links.  I want to write a
>> command to iterate over those links and prompt for each
>> whether to call browse-url on it.

> This command (if I understand your requirements correctly) is already in
> Gnus master, as `gnus-summary-browse-url'. Look for that or, if you're
> running an older Emacs, check out here:

> https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/gnus/gnus-sum.el#n9507

Thanks; AFAICT, my requirements cannot be met by that.

The newsletters I'm thinking about typically have links such
as:

| Header_Link_A
| Header_Link_B

| Item_1_Link_A   Item_1_Link_B   Item_1_Link_C

| Item_2_Link_A   Item_2_Link_B   Item_2_Link_C

| Item_3_Link_A   Item_3_Link_B   Item_3_Link_C

| […]

| Footer_Link_A
| Footer_Link_B
| Footer_Link_C

I want to iterate (only) over Item_1_Link_B, Item_2_Link_B,
Item_3_Link_B, etc.

*But* your pointer gave me the idea that I could iterate
over shr's buttons like gnus-collect-urls does, test if
their URLs match Item_x_Link_B's typical pattern and then
offer to browse them.  This would require that
Item_x_Link_B's pattern is (relatively) stable; I have to
check whether that will work reasonably well.  Thanks!

Tim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]