Closed sebastien-k closed 7 months ago
Haaha, let me guess: you probably got that after several books...
Please have a read at mobileread forum, thread [Metadata Source Plugin] babelio_db link : [Metadata Source Plugin] babelio_db - MobileRead Forums.
It looks to me that babelio.com stopped responding so you got “404, URI not found” … Try it manually, from the same PC (from the same IP address in fact), I bet you will not be able to reach babelio.com, in other words, you have been banned.
In that case, the plugin does work, babelio.com refuses to work anymore.
Please close this if my answer helps, even if it is not good news.
Moi, j'obtiens ça avec pour titre: "Au Coeur De L'Antiterrorisme" de "Marc Trévidic"... et calibre est correctement rempli.
Running identify query with parameters:
{'title': "Au Coeur De L'Antiterrorisme", 'authors': ['Marc Trévidic'], 'identifiers': {}, 'timeout': 30}
Using plugins: Babelio_db (0, 8, 6)
The log from individual plugins is below
****************************** Babelio_db (0, 8, 6) ******************************
Found 1 results
Downloading from Babelio_db took 3.0658016204833984
---
Title : Au coeur de l'antiterrorisme
Author(s) : Marc Trévidic
Publisher : J.-C. Lattès
Tags : Essai, Droit, Terrorisme
Languages : fr
Rating : 2
Published : 2011-01-08T23:00:00+00:00
Identifiers : isbn:9782709635691, babelio_id:Trevidic-Au-coeur-de-lantiterrorisme/231124
Comments : b'<html>\n <body>\n <div>\n <p>\n Référence:\n <a href="https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124">\n https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124\n </a>\n </p>\n </div>\n </body>\n</html>\n<html>\n <body>\n <div>\n <hr/>\n <p style="font-weight: bold; font-size: 18px">\n Popularité\n </p>\n <hr/>\n </div>\n </body>\n</html>\n<html>\n <body>\n <div>\n <p>\n Le nombre de cotations est\n <strong>\n 18\n </strong>\n , avec une note moyenne de\n <strong>\n 3.94\n </strong>\n sur 5\n </p>\n </div>\n </body>\n</html>\n<html>\n <body>\n <div>\n <hr/>\n <p style="font-weight: bold; font-size: 18px">\n Résumé\n </p>\n <hr/>\n </div>\n </body>\n</html>\n<html>\n <head>\n </head>\n <body>\n La poudrière de Karachi, l’assassinat des moines de Tibéhirine, l’attentat de la rue Copernic, le génocide rwandais… Ces dossiers « secret défense », parmi les plus sensibles de la République, sont sur le bureau de Marc Trévidic, spécialiste de l’antiterrorisme au tribunal de Paris. Il est l’homme qui monte. Après Eva Joly ou Eric Halphen, celui que l’on surnomme le « juge batailleur » représente la nouvelle génération des magistrats charismatiques et frondeurs. Il est aussi le nouvel emblème de leur lutte pour l’indépendance. Respecté, encensé, jalousé, il instruit avec obsession des affaires qui embarrassent jusqu’au sommet de l’Etat. Pour la première fois, Marc Trévidic se livre sans fard et sans langue de bois, et nous fait plonger dans l’univers méconnu de l’antiterrorisme. Le jeune juge nous fait découvrir l’envers du décor, derrière les portes blindées de la galerie Saint-Eloy, où travaille l’équipe de magistrats les plus protégés de France, ou dans les coulisses de ses missions à l’étranger : déplacements sous haute protection, interrogatoires dans les souterrains de prisons secrètes à l’autre bout du monde…. Voilà le récit de l\'ascension d’un juge téméraire, au cœur de l’actualité. Ses succès, ses désillusions, ses espoirs, ses engagements.\n <br/>\n </body>\n</html>'
-+-+-+-+-+-+-+-+-+-+ Entry point +-+-+-+-+-+-+-+-+-+-
self.dgb_lvl : 15
self.with_cover : True
self.with_pretty_comments : True
self.with_detailed_rating : True
self.tag_genre : 1
self.tag_theme : 2
self.tag_lieu : 0
self.tag_quand : 0
In identify(self, log, result_queue, abort, title=.., authors=.., identifiers=.., timeout=30)
title : Au Coeur De L'Antiterrorisme
identifiers : {}
authors : ['Marc Trévidic'] <class 'list'>
Pas de résultat avec babelio_id ou avec l'ISBN, on recherche les auteurs et le titre.
in create_query()
title : Au Coeur De L'Antiterrorisme
authors : ['Marc Trévidic']
In ret_clean_txt(self, log, text, who='')
text : Marc Trévidic
cleaned text : marc trevidic
return text from ret_clean_txt
In ret_clean_txt(self, log, text, who='')
text : Au Coeur De L'Antiterrorisme
cleaned text : au coeur de l antiterrorisme
return text from ret_clean_txt
return url from create_query : https://www.babelio.com/recherche
return rkt from create_query : {'Recherche': 'marc trevidic au coeur de l antiterrorisme'}
In ret_soup(log, dbg_lvl, br, url, rkt={'Recherche': 'marc trevidic au coeur de l antiterrorisme'}, who=)
URL request time : 12:10:16
br : <Browser (not visiting a URL)>
url : https://www.babelio.com/recherche
rkt : {'Recherche': 'marc trevidic au coeur de l antiterrorisme'}
Accessing url : https://www.babelio.com/recherche
search parameters : {'Recherche': 'marc trevidic au coeur de l antiterrorisme'}
formated parameters : Recherche=marc+trevidic+au+coeur+de+l+antiterrorisme
In urlopen_with_retry(log, dbg_lvl, br, url, rkt=b'Recherche=marc+trevidic+au+coeur+de+l+antiterrorisme', who=)
(urlopen_with_retry) sr.getcode() : 200
url_vrai : https://www.babelio.com/recherche
sr.info() : Server: nginx
Date: Fri, 08 Mar 2024 11:10:17 GMT
Content-Type: text/html; charset=ISO-8859-1
Connection: close
Set-Cookie: p=GB; expires=Sat, 08-Mar-2025 11:10:17 GMT; Max-Age=31536000
Set-Cookie: disclaimer=1; expires=Sat, 08-Mar-2025 11:10:17 GMT; Max-Age=31536000
Cache-Control: no-cache
Expires: Fri, 08 Mar 2024 11:10:16 GMT
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
content-type: text/html; charset=iso-8859-1
content-language: fr-FR
cache-control: no-cache
pragma: no-cache
expires: -1
x-ua-compatible: IE=edge
In parse_search_results(self, log, orig_title, orig_authors, soup, br)
orig_title : Au Coeur De L'Antiterrorisme
orig_authors : ['marc trevidic']
In ret_clean_txt(self, log, text, who='')
text : Au coeur de l'antiterrorisme
cleaned text : au coeur de l antiterrorisme
return text from ret_clean_txt
In ret_clean_txt(self, log, text, who='')
text : Au Coeur De L'Antiterrorisme
cleaned text : au coeur de l antiterrorisme
return text from ret_clean_txt
In ret_clean_txt(self, log, text, who='')
text : Marc Trévidic
cleaned text : marc trevidic
return text from ret_clean_txt
In ret_clean_txt(self, log, text, who='')
text : marc trevidic
cleaned text : marc trevidic
return text from ret_clean_txt
titre, ratio : Au coeur de l'antiterrorisme, 1.0, auteur, ratio : Marc Trévidic, 1.0, sous_url : /livres/Trevidic-Au-coeur-de-lantiterrorisme/231124
nombre de références trouvées dans babelio 1
srt_match[i] : ('/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124', 2.0)
YES, perfect match on both author and title, take only one.
nombre de matches : 1
matches at return time :
https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124
matches : ['https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124']
[worker 0] entry time : Fri Mar 8 12:10:17 2024
[worker 0] self.url : https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124
[worker 0] self.relevance : 0
[worker 0] self.plugin : <calibre_plugins.babelio_db.Babelio object at 0x000002D8CFEF4730>
[worker 0] self.dbg_lvl : 15
[worker 0] self.timeout : 20
[worker 0] self.with_cover : True
[worker 0] self.with_pretty_comments : True
[worker 0] self.with_detailed_rating : True
[worker 0] self.tag_genre : 1
[worker 0] self.tag_theme : 2
[worker 0] self.tag_lieu : 0
[worker 0] self.tag_quand : 0
submit time : Fri Mar 8 12:10:17 2024
[worker 0] in run(self)
[worker 0] in get_details(self)
[worker 0] in get details(), start time : 1709896217.3012896
[worker 0] calling ret_soup(log, dbg_lvl, br, url, rkt=None, who='')
[worker 0] self.url : https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124
[worker 0] In ret_soup(log, dbg_lvl, br, url, rkt=None, who=[worker 0])
[worker 0] URL request time : 12:10:18
[worker 0] br : <Browser (not visiting a URL)>
[worker 0] url : https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124
[worker 0] rkt : None
[worker 0] Accessing url : https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124
[worker 0] In urlopen_with_retry(log, dbg_lvl, br, url, rkt=None, who=[worker 0])
[worker 0] (urlopen_with_retry) sr.getcode() : 200
[worker 0] url_vrai : https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124
[worker 0] sr.info() : Server: nginx
Date: Fri, 08 Mar 2024 11:10:18 GMT
Content-Type: text/html; charset=ISO-8859-1
Connection: close
Cache-Control: no-cache
Expires: Fri, 08 Mar 2024 11:10:17 GMT
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
content-type: text/html; charset=iso-8859-1
content-language: fr-FR
cache-control: no-cache
pragma: no-cache
expires: -1
x-ua-compatible: IE=edge
[worker 0] Temps après ret_soup()... : 1.3783137798309326
[worker 0] in parse_bbl_id
[worker 0] bbl_id : Trevidic-Au-coeur-de-lantiterrorisme/231124
[worker 0] Temps après parse_bbl_id() ... : 1.3783137798309326
[worker 0] in parse_details(self, soup)
[worker 0] in parse_details(), new start : 1709896218.6796033
[worker 0] in parse_authors(self, soup)
[worker 0] return bbl_authors ['Marc Trévidic']
[worker 0] Temps après parse_authors() ... : 0.0019953250885009766
[worker 0] in parse_title_series(self, soup, bbl_authors)
[worker 0] bbl_title : Au coeur de l'antiterrorisme - Marc Trévidic
[worker 0] name : Marc Trévidic
[worker 0] bbl_title : Au coeur de l'antiterrorisme
[worker 0] Temps après parse_title_series() ... : 0.006981849670410156
[worker 0] in parse_meta(self, soup)
[worker 0] bbl_publisher processed : J.-C. Lattès
[worker 0] bbl_isbn processed : 9782709635691
[worker 0] bbl_pubdate processed : 2011-01-09 00:00:00
[worker 0] parse_meta() returns bbl_isbn, bbl_publisher, bbl_pubdate : 9782709635691 J.-C. Lattès 2011-01-09 00:00:00
[worker 0] Temps après parse_meta() ... : 0.013963460922241211
[worker 0] in parse_rating(self, soup)
[worker 0] parse_rating() returns bbl_rating : 3.94, bbl_rating_cnt : 18
[worker 0] Temps après parse_rating() ... : 0.01595783233642578
[worker 0] in parse_tags(self, soup)
[worker 0] parse_tags() return bbl_tags ['Essai', 'Droit', 'Terrorisme']
[worker 0] Temps après parse_tags() ... : 0.019946813583374023
[worker 0] in parse_cover(self, soup)
[worker 0] parse_cover() returns bbl_cover : https://www.babelio.com/couv/CVT_22153_1054566.jpg
[worker 0] Temps après parse_cover() ... : 0.019946813583374023
[worker 0] in parse_comments(self, soup)
[worker 0] onclick : javascript:voir_plus_a('#d_bio',1,130033);
[worker 0] calling ret_soup(log, dbg_lvl, br, url, rkt=rkt, who=self.who
[worker 0] url : https://www.babelio.com/aj_voir_plus_a.php
[worker 0] rkt : {'type': '1', 'id_obj': '130033'}
[worker 0] In ret_soup(log, dbg_lvl, br, url, rkt={'type': '1', 'id_obj': '130033'}, who=[worker 0])
[worker 0] URL request time : 12:10:19
[worker 0] br : <Browser visiting https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124>
[worker 0] url : https://www.babelio.com/aj_voir_plus_a.php
[worker 0] rkt : {'type': '1', 'id_obj': '130033'}
[worker 0] Accessing url : https://www.babelio.com/aj_voir_plus_a.php
[worker 0] search parameters : {'type': '1', 'id_obj': '130033'}
[worker 0] formated parameters : type=1&id_obj=130033
[worker 0] In urlopen_with_retry(log, dbg_lvl, br, url, rkt=b'type=1&id_obj=130033', who=[worker 0])
[worker 0] (urlopen_with_retry) sr.getcode() : 200
[worker 0] url_vrai : https://www.babelio.com/aj_voir_plus_a.php
[worker 0] sr.info() : Server: nginx
Date: Fri, 08 Mar 2024 11:10:20 GMT
Content-Type: text/html; charset=ISO-8859-1
Connection: close
Cache-Control: no-cache
Expires: Fri, 08 Mar 2024 11:10:19 GMT
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
[worker 0] Temps après parse_comments() ... : 1.3005225658416748
timing of the accesses to Babelio for this book
When : Fri Mar 8 12:10:17 2024; Who : [__init__]; Where : https://www.babelio.com/recherche
When : Fri Mar 8 12:10:18 2024; Who : [worker 0]; Where : https://www.babelio.com/livres/Trevidic-Au-coeur-de-lantiterrorisme/231124
When : Fri Mar 8 12:10:19 2024; Who : [worker 0]; Where : https://www.babelio.com/aj_voir_plus_a.php
********************************************************************************
The identify phase took 3.15 seconds
The longest time (3.065802) was taken by: Babelio_db
Merging results from different sources
We have 1 merged results, merging took: 0.00 seconds
Thanks for your quick reply (I'll write in English even if I'm French, as the plugin is in English).
So, the plugin actually never worked for me at all. I installed it a few days ago (with the latest Calibre version), and it could never get any metadata from Babelio.
BUT I can update metadata by copy and pasting the url of the book on Babelio in the "Ids" field in the Edit metadata window, and then click on "Download Metadata". I get metadata in this case.
This means I have to search for the book manually on the Babelio website, copy and paste it in the right field, which is not convenient at all and VERY time consuming.
And obviously, I can access Babelio with my browser, and do manual search, so I guess I'm not banned.
I tried to reinstall Calibre and the plugin on another PC: same result.
So I'm out of clue. Any idea ?
Thanks again !
Another log with another book:
calibre, version 7.6.0
ERROR: No matches found: <p>Failed to find any books that match your search. Try making the search <b>less specific</b>. For example, use only the author's last name and a single distinctive word from the title.<p>To see the full log, click "Show details".
Running identify query with parameters:
{'title': 'Le Passe-Muraille', 'authors': ['Marcel Aymé'], 'identifiers': {}, 'timeout': 30}
Using plugins: Babelio_db (0, 8, 3)
The log from individual plugins is below
****************************** Babelio_db (0, 8, 3) ******************************
Found 0 results
Downloading from Babelio_db took 21.425118684768677
-+-+-+-+-+-+-+-+-+-+ Entry point +-+-+-+-+-+-+-+-+-+-
self.dgb_lvl : 15
self.with_cover : False
self.with_pretty_comments : False
self.with_detailed_rating : False
In identify(self, log, result_queue, abort, title=.., authors=.., identifiers=.., timeout=30)
title : Le Passe-Muraille
identifiers : {}
authors : ['Marcel Aymé'] <class 'list'>
Pas de résultat avec babelio_id ou avec l'ISBN, on recherche les auteurs et le titre.
in create_query()
title : Le Passe-Muraille
authors : ['Marcel Aymé']
In ret_clean_txt(self, log, text, who='')
text : Marcel Aymé
cleaned text : marcel ayme
return text from ret_clean_txt
In ret_clean_txt(self, log, text, who='')
text : Le Passe-Muraille
cleaned text : le passe muraille
return text from ret_clean_txt
return query from create_query : http://www.babelio.com/resrecherche.php?Recherche=marcel+ayme+le+passe+muraille&tri=auteur&item_recherche=livres&pageN=1
In ret_soup(log, dbg_lvl, br, url, rkt=none, who=''
URL request time : 15:51:21
br : <Browser (not visiting a URL)>
url : http://www.babelio.com/resrecherche.php?Recherche=marcel+ayme+le+passe+muraille&tri=auteur&item_recherche=livres&pageN=1
rkt : None
Accessing url : http://www.babelio.com/resrecherche.php?Recherche=marcel+ayme+le+passe+muraille&tri=auteur&item_recherche=livres&pageN=1
In urlopen_with_retry(log, dbg_lvl, br, url, rkt, who='')
(urlopen_with_retry) HTTP Error 404: Not Found , will retry in 3 seconds...
(urlopen_with_retry) HTTP Error 404: Not Found , will retry in 6 seconds...
(urlopen_with_retry) HTTP Error 404: Not Found , will retry in 12 seconds...
exception occured...
code : 404 reason : Not Found
Plugin Babelio_db failed
Traceback (most recent call last):
File "calibre_plugins.babelio_db.__init__", line 81, in urlopen_with_retry
File "mechanize\_mechanize.py", line 257, in open
File "mechanize\_mechanize.py", line 313, in _mech_open
mechanize._response.get_seek_wrapper_class.<locals>.httperror_seek_wrapper: HTTP Error 404: Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "calibre\ebooks\metadata\sources\identify.py", line 47, in run
File "calibre_plugins.babelio_db.__init__", line 408, in identify
File "calibre_plugins.babelio_db.__init__", line 60, in __call__
File "calibre_plugins.babelio_db.__init__", line 127, in ret_soup
File "calibre_plugins.babelio_db.__init__", line 99, in urlopen_with_retry
Exception: ('(urlopen_with_retry) Failed while acessing url : ', 'http://www.babelio.com/resrecherche.php?Recherche=marcel+ayme+le+passe+muraille&tri=auteur&item_recherche=livres&pageN=1')
********************************************************************************
The identify phase took 21.45 seconds
The longest time (21.425119) was taken by: Babelio_db
Merging results from different sources
We have 0 merged results, merging took: 0.00 seconds
I can see you have:
****************************** Babelio_db (0, 8, 6) ******************************
On my side I have:
****************************** Babelio_db (0, 8, 3) ******************************
I don't know if this is relevant ...
Hooho, sorry, I should have thought about that. one.... In calibre, try to fetch the latest version of the plugin, open it and read the "changelog.txt"
OR
please go to https://www.mobileread.com/forums/showthread.php?t=349713 (same ref as first but title removed so you can see where it goes). Download latest version, read this site's entry # 1 in English or in French (French is my mother language) so that you know how to install it. While you are at it, read entry # 2 that explains all the changes and why v083 was replaced and made unavailable (basically because babelio.com changed the search access).
A small explanation
Please understand that github is for me THE backup solution for my flaky pc. To make a long story short, github saved my work more than once when my whole data disk went corrupt (no it was not encrypted, it seems that the disk controller hardware decided to remove a few random bits on unexpected power down). I do backup every 2 weeks but I lost several recent changes (not funny).
ok enough rambling go to mobileread.com, this site is very rich and it holds many different aspects of ebook reader including calibre and the many plugins...
Please close this (non anymore) issue, and open a new on on the latest version if you still have problems
Et comme on dit chez nous, cordialement.
It works! I downloaded the latest version in the plugin page. This is not the one offered by default on the plugin manager within Calibre.
Merci beaucoup !
Issue solved
Hi sebastien-k, I want to thank you for telling me that the latest version was not the one proposed by the plugin manager... I think it is now corrected...
Hi,
Download metadata does not work.
Hereafter the log I got:
I wish your plugin would work, it would be a wonderful time saver!