View Single Post
Old 08-10-2025, 11:15 AM   #1
primolarry
Junior Member
primolarry began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2016
Device: Kindle voyage
How to obtain the URL of the article in postprocess_html

Hi there,

I have coded a recipe that retrieves URL from Todoist (task app) and builds an epub

https://github.com/rga5321/todoist2e...Todoist.recipe

I would like to recover the URL of every article so I can add it in the HTML (it is coded in a separate part of the project, but it doesn't work. I want to do it inside the recipe)

In parse_index, for every chapter, I add every article with these metadata (line 178):
Code:
                                        arts.append({
                                          'title': title,
                                          'url': url,
                                          'date': item['date_added']})
But I don't know how to recover the "url" metadata in postprocess_html(self, soup, first), where I don't have the article object.

Can anyone point me in the right direction?

Thanks a lot, regards
primolarry is offline   Reply With Quote