View Single Post
Old 10-13-2024, 10:06 PM   #5
ender7
Junior Member
ender7 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2024
Device: Kobo Libra 2
Quote:
Originally Posted by dunderwerk View Post
Namaskar Kovidgoyal,

Thank you for your answer to reasonablehabit's question!

Not being a programmer myself (and many like me), could you please show how to implement the code into this recipe?
Google led me to this thread. In my case I just needed something quick to run once to get all the posts that were years old. I used ChatGPT to parse the html for the page containing links to all the posts. Used it to convert the html to a list of dictionaries. Created a parse_html function like so. This would be for one feed containing 2 posts.

PHP Code:
def parse_index(self):
        
feeds = [
            {
"title""UI Part 1: The Interaction Medium""url""https://www.example.com/first-post"},
            {
"title""UI Part 2: Every Single Frame""url""https://www.example.com/second-post"}
        ]
        return [(
'articles'feeds)] 
Add that to your existing recipe. If you need more details they are in the link provided by kovid. Specifically the recipe for the Atlantic news site.
ender7 is offline   Reply With Quote