11-25-2021, 02:35 PM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra H20
|
Mediapart recipe doesn't work anymore
Hi,
The website Mediapart was updated recently and since then the recipe doesn't work. The ePub created seems normal but the articles are blank, with just the titles. It worked fine before the update. I had this issue a few times before but I just had to redownload a second time and that was it. I think this is the recipe. Is there anything I can do about this ? I checked the URLs (pretty much the only thing I understand lol). The feed in the recipe is HTTP instead of HTTPS (I changed it in a custom recipe to be sure but it didn't change anything) and the rest is ok. Thanks ! |
11-26-2021, 07:58 AM | #2 |
creator of calibre
Posts: 44,648
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You will likely need to change the keep_only_tags setting.
|
Advert | |
|
11-26-2021, 11:45 AM | #3 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra H20
|
Okay so I deleted lines 45 to 49
Code:
keep_only_tags = [ dict(name='h1'), dict(name='div', **classes('author')), classes('introduction content-article') ] The issue is that when I transfer the ePub to my Libra I can't access the articles. Going to the next page, even choosing a particular page, send me to the next article's first page (the one with links to the table of content). The ePub is 1700 pages long (!!) when it used to be ~250. The articles are there, it just won't let me read it Thanks for your help ! |
11-26-2021, 01:23 PM | #4 |
creator of calibre
Posts: 44,648
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You will need to figure out what to replace those with to extract the article's contents. See https://manual.calibre-ebook.com/news.html for an overview of the process.
|
11-27-2021, 07:37 AM | #5 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra H20
|
The print version looks great but the URL doesn't seem to match like the BBC exemple.
Article : https://www.mediapart.fr/journal/france/261121/les-lecons-de-l-affaire-nicolas-hulot Print version : https://www.mediapart.fr/tools/print/996766 I can roughly see where the article is in the code but I'm not sure how to use keep/remove tags. |
Advert | |
|
12-04-2021, 07:22 AM | #6 |
Junior Member
Posts: 1
Karma: 10
Join Date: Dec 2021
Device: Kindle 4
|
Hi,
I just noticed the same issue. After analysis, i think i found a fix : keep_only_tags = [ dict(name='h1'), dict(name='div', **classes('author')), classes('news__heading__top__intro news__body__center__article') ] Working for me |
12-04-2021, 11:51 AM | #7 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra H20
|
Thanks a lot, sadly it's not working for me. It's perfect with Calibre's ereader but the articles are randomly cut on my Libra.
It always cut just before the links to other articles ("à lire aussi"). Kepub conversion didn't help so I ran a book check and got 19 "Parsing failed: redefinition of the xmlns prefix is forbidden" errors (screen attached). Here's the full recipe : Spoiler:
I'm assuming those links are the issue, at least with Kobo Libra (that's where it cuts and where the errors are), but I have no idea how to fix this. |
12-05-2021, 12:50 AM | #8 |
creator of calibre
Posts: 44,648
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just add svg to remove_tags in the recipe.
|
12-05-2021, 07:35 AM | #9 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra H20
|
I added this :
Code:
remove_tags = [dict(name='svg')] I tried to add stuff like "class" which didn't help, and eventually decided to test it on my Libra anyway... It's working I didn't notice any cuts and the table of content is functional. The full recipe : Spoiler:
I can post screenshots of the errors if anyone is interested, errors are :
Thanks a lot for the help ! |
12-11-2021, 10:03 AM | #10 |
Junior Member
Posts: 7
Karma: 10
Join Date: Feb 2015
Device: Kobo Touch
|
Recipe updated in Calibre ?
Thank you all, worked for me too.
Oddly, I didn't make any change by myself in the code, but I can see that the recipe has been been updated within Calibre, because the code is different from the version of january 2021 (see Github page : https://github.com/lhoupert/calibre_...diapart.recipe). Is it possible, even though I didn't updated the whole app (Calibre) ? @Kovid ? |
12-11-2021, 10:09 AM | #11 |
creator of calibre
Posts: 44,648
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
recipes are updated automatically. you dont need to update calibre for it.
|
12-11-2021, 10:19 AM | #13 |
Junior Member
Posts: 7
Karma: 10
Join Date: Feb 2015
Device: Kobo Touch
|
|
03-26-2022, 08:01 AM | #14 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra H20
|
Hi,
I just got this error message today (the line in french means "conversion failed") : Spoiler:
Not sure what's the issue ? It was working fine yesterday and I didn't change anything since. Thanks ! |
03-26-2022, 11:32 PM | #15 |
creator of calibre
Posts: 44,648
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It means the website has changed and the recipe needs to be updated.
|
Tags |
mediapart recipe calibre |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Subscribing in Mediapart [new] recipe don't work | j33p | Recipes | 1 | 09-14-2020 10:14 AM |
PRS-T1 Recovery Mode doesn't work anymore | bookp | Sony Reader Dev Corner | 2 | 07-13-2012 07:13 PM |
Connect to itunes for Calibre doesn't work anymore | Marquis | Apple Devices | 9 | 02-18-2012 08:21 PM |
DIE ZEIT Premium recipe doesn't work anymore | Moik | Recipes | 1 | 07-16-2011 02:46 PM |
Downloading a cover doesn't work anymore? | JGB | Calibre | 13 | 12-05-2008 02:40 PM |