Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 04-28-2024, 06:42 AM   #16
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I guess I can try to see if implementing the login using a headless js browser and then copying the cookies will work, but so many moving parts...
kovidgoyal is offline   Reply With Quote
Old 04-28-2024, 09:18 AM   #17
jwhittin
Enthusiast
jwhittin began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Dec 2010
Location: Melbourne, Australia
Device: Kobo Clara Colour
Oh dear, sounds fragile. But if you could, that would be really great. Happy to test it you need it.

Many thanks.
jwhittin is offline   Reply With Quote
Advert
Old 04-28-2024, 11:44 AM   #18
unkn0wn
Fanatic
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 543
Karma: 82944
Join Date: May 2021
Device: kindle
this is just temporary. i dont know for how long this can work.. but it works for me, for this weeks edition.
Attached Files
File Type: recipe economist.recipe (13.6 KB, 157 views)

Last edited by unkn0wn; 04-28-2024 at 01:02 PM.
unkn0wn is offline   Reply With Quote
Old 04-28-2024, 01:07 PM   #19
RobbieW
Member
RobbieW began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2013
Device: Kobo Touch
Quote:
Originally Posted by unkn0wn View Post
this is just temporary. i dont know for how long this can work.. but it works for me, for this weeks edition.
I was missing pages in the UK section, this variant fixed that just now - thank you
RobbieW is offline   Reply With Quote
Old 04-28-2024, 09:22 PM   #20
jwhittin
Enthusiast
jwhittin began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Dec 2010
Location: Melbourne, Australia
Device: Kobo Clara Colour
Quote:
Originally Posted by unkn0wn View Post
this is just temporary. i dont know for how long this can work.. but it works for me, for this weeks edition.
It works for me too. Many thanks unkn0wn.

I note that it produces a much smaller file than the normal recipe. What's the difference? (I've tried but can't really understand the recipe script) Also, FYI - it only seems to work for the current edition - I tried putting in last week's date on line 18 but it still brought up the current edition.
jwhittin is offline   Reply With Quote
Advert
Old 04-28-2024, 11:03 PM   #21
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@unkn0wn: Nice find. I have updated the builtin recipes to use the GraphQL query to load the content, let's see if it continues to work next week. I have kept the old code around so if it does break next week we can still re-use it easily.

This, of course breaks downloading past editions, but I imagine to re-enable that we need to find the correct content_id give an edition date.
kovidgoyal is offline   Reply With Quote
Old 04-28-2024, 11:46 PM   #22
jwhittin
Enthusiast
jwhittin began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Dec 2010
Location: Melbourne, Australia
Device: Kobo Clara Colour
Quote:
Originally Posted by kovidgoyal View Post
I have updated the builtin recipes to use the GraphQL query to load the content
Just tested and works well for me. Many thanks Kovid.
jwhittin is offline   Reply With Quote
Old 04-29-2024, 01:38 AM   #23
unkn0wn
Fanatic
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 543
Karma: 82944
Join Date: May 2021
Device: kindle
Quote:
Originally Posted by kovidgoyal View Post
I have kept the old code around so if it does break next week we can still re-use it easily.

This, of course breaks downloading past editions, but I imagine to re-enable that we need to find the correct content_id give an edition date.
That's why I didn't want to push this update. I was not sure if the link would work next week or even tomorrow and didn't want to lose old code.

i think there's a different query for past editions.. i'll try to find it, if this works for next weeks edition.
unkn0wn is offline   Reply With Quote
Old 05-01-2024, 10:19 PM   #24
Steven630
Groupie
Steven630 began at the beginning.
 
Posts: 172
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Quote:
Originally Posted by unkn0wn View Post
this is just temporary. i dont know for how long this can work.. but it works for me, for this weeks edition.
Hello. Economist Espresso recipe, which was a simplified version of Economist recipe, started to fetch only the first two paragraphs since yesterday. Would you please take a look? Thank you.

https://www.economist.com/the-world-in-brief

Last edited by Steven630; 05-02-2024 at 12:03 AM.
Steven630 is offline   Reply With Quote
Old 05-02-2024, 04:59 AM   #25
unkn0wn
Fanatic
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 543
Karma: 82944
Join Date: May 2021
Device: kindle
https://github.com/kovidgoyal/calibr...c1e68b3ed201b0
unkn0wn is offline   Reply With Quote
Old 05-03-2024, 12:49 PM   #26
Steven630
Groupie
Steven630 began at the beginning.
 
Posts: 172
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Quote:
Originally Posted by unkn0wn View Post
Thank you.

There is a little bug with Economist recipe. The flytitle appears on a separate page before the h1 title(thus before the rest of the article) on my Kindle. Flytitle, h1 title, and rubric should be on the same page. I don't know why this happens.
Steven630 is offline   Reply With Quote
Old 05-04-2024, 09:56 AM   #27
unkn0wn
Fanatic
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 543
Karma: 82944
Join Date: May 2021
Device: kindle
Quote:
Originally Posted by Steven630 View Post
Thank you.

There is a little bug with Economist recipe. The flytitle appears on a separate page before the h1 title(thus before the rest of the article) on my Kindle. Flytitle, h1 title, and rubric should be on the same page. I don't know why this happens.
idk maybe lower the font size and check if it re-adjusts.
unkn0wn is offline   Reply With Quote
Old 05-04-2024, 10:08 AM   #28
Steven630
Groupie
Steven630 began at the beginning.
 
Posts: 172
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Quote:
Originally Posted by unkn0wn View Post
idk maybe lower the font size and check if it re-adjusts.
There's a page before the article with only flytitle followed by blank content (the entire page has only flytitle). The font size is small enough
Steven630 is offline   Reply With Quote
Old 05-05-2024, 12:50 AM   #29
Steven630
Groupie
Steven630 began at the beginning.
 
Posts: 172
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
I ended up adding the text of flytitle to h1:

Code:
        if 'flyTitle' in data and data['flyTitle']:
            title_text = f"{data['flyTitle']}: {data['title']}"
        else:
            title_text = data['title']
        #E(article, 'div', data['flyTitle'] , style='color: red; font-size:small; font-weight:bold;')
        E(article, 'h1', title_text, title=safe_dict(data, "url", "canonical") or '')
Steven630 is offline   Reply With Quote
Old 05-12-2024, 05:50 AM   #30
RobbieW
Member
RobbieW began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2013
Device: Kobo Touch
An observation - the reworked recipe seems to download the complete paper, thank you. However the filesize is now much smaller than previous. The current copy is c. 7Mb, its been 20-30Mb for some while - is this expected ?
RobbieW is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Economist recipe fails - no articles mkgtu Recipes 2 05-11-2023 08:49 PM
Economist only downloading two articles davidsmartin Recipes 6 06-20-2022 10:17 AM
Convert "The Economist" EPUB to MOBI = Lose Navigation to Articles and Sections dukelov3 Conversion 3 03-08-2013 11:11 PM
Fetching multi-page articles Steven630 Recipes 27 08-21-2012 11:04 PM
The Economist-Missing articles redall Recipes 0 06-16-2011 01:41 PM


All times are GMT -4. The time now is 02:28 PM.


MobileRead.com is a privately owned, operated and funded community.