Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-22-2017, 12:46 PM   #16
webwizard
Member
webwizard began at the beginning.
 
webwizard's Avatar
 
Posts: 20
Karma: 10
Join Date: Feb 2011
Device: Kindle DX
Quote:
Originally Posted by BeckyEbook View Post
In file __init__.py change line 197:
Code:
results = root.xpath('//h2/a [@class="l"]')
to
Code:
results = root.xpath('//h3[@class="r"]/a')
Yep, it worked.

I was just wondering if there's a way to set custom metadata as well via plugin. I added a custom field named "titolo originale" (original title) and I'd like to set it through the plugin.

Anybody knows if it's possible ?

Thanks
webwizard is offline   Reply With Quote
Old 03-22-2017, 01:32 PM   #17
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 687
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
Quote:
Originally Posted by webwizard View Post
I was just wondering if there's a way to set custom metadata as well via plugin. I added a custom field named "titolo originale" (original title) and I'd like to set it through the plugin.

Anybody knows if it's possible ?
Yes, although this can not be done in one step.

Step 1: Download original title and add it to comment.
Step 2: Copy (or move) original title from comment to a custom column "original title".

In the same way I did it in the plugin "LubimyCzytac" + "LCmover".
Look here (the first two posts): https://www.mobileread.com/forums/sh...d.php?t=282922
BeckyEbook is offline   Reply With Quote
Old 03-23-2017, 08:43 AM   #18
webwizard
Member
webwizard began at the beginning.
 
webwizard's Avatar
 
Posts: 20
Karma: 10
Join Date: Feb 2011
Device: Kindle DX
Quote:
Originally Posted by BeckyEbook View Post
Yes, although this can not be done in one step.

Step 1: Download original title and add it to comment.
Step 2: Copy (or move) original title from comment to a custom column "original title".

In the same way I did it in the plugin "LubimyCzytac" + "LCmover".
Look here (the first two posts): https://www.mobileread.com/forums/sh...d.php?t=282922
I'll look into it. It will take time, 'cause I'm still learning Python, let alone writing a plugin...

In the meantime, many thanks...
webwizard is offline   Reply With Quote
Old 06-26-2018, 02:07 AM   #19
stragnagn
Junior Member
stragnagn began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2013
Device: Kobo
The plugin doesn't work anymore, as webwizard stated.

No results even is the query is correct and if I try to use the query URL manually, i.e.:

https://www.google.com/search?as_sit...ri+Alan+Nourse

I've tried to make the correction suggested by BeckyEbook in post #15 but nothing changed.

Will someone please help?

Thanks.

Last edited by stragnagn; 06-26-2018 at 02:09 AM. Reason: notifications
stragnagn is offline   Reply With Quote
Old 06-26-2018, 10:47 AM   #20
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 687
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
It works.
title: I Mercenari
author: Alan Nourse

and fetch metadata.
BeckyEbook is offline   Reply With Quote
Old 06-27-2018, 03:31 AM   #21
stragnagn
Junior Member
stragnagn began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2013
Device: Kobo
Quote:
Originally Posted by BeckyEbook View Post
It works.
title: I Mercenari
author: Alan Nourse

and fetch metadata.
Thanks for your answer.

However even if I've got the same book, the plug-in does not work for me. Here is a screenshot:

Click image for larger version

Name:	1530084561.png
Views:	413
Size:	355.5 KB
ID:	164683

And this is the details given by Calibre:

calibre, version 3.21.0
ERRORE: Nessuna corrispondenza trovata: <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:
{u'authors': [u'Alan Nourse'], u'identifiers': {}, u'timeout': 30, u'title': u'I Mercenari'}
Using plugins: MondoUrania (0, 2, 1)
The log from individual plugins is below

****************************** MondoUrania (0, 2, 1) ******************************
Found 0 results
Downloading from MondoUrania took 0.44456410408
Querying: http://www.google.com/custom?as_site...ri+Alan+Nourse
title: i mercenari - Mondourania
url: []
Plugin MondoUrania failed
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/ebooks/metadata/sources/identify.py", line 48, in run
self.plugin.identify(self.log, self.rq, self.abort, **self.kwargs)
File "calibre_plugins.MondoUrania.__init__", line 154, in identify
File "calibre_plugins.MondoUrania.__init__", line 238, in _parse_search_results
IndexError: list index out of range

************************************************** ******************************
The identify phase took 0.60 seconds
The longest time (0.444564) was taken by: MondoUrania
Merging results from different sources and finding earliest publication dates from the worldcat.org service
We have 0 merged results, merging took: 0.00 seconds


Could you please help?

Thanks.

Last edited by BetterRed; 06-27-2018 at 03:54 AM. Reason: move image to MR
stragnagn is offline   Reply With Quote
Old 06-27-2018, 03:51 AM   #22
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 687
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
Works for me.
Attached Files
File Type: zip MondoUrania.zip (8.7 KB, 312 views)
BeckyEbook is offline   Reply With Quote
Old 06-27-2018, 04:04 AM   #23
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,544
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Moderator Notice
@stragnagn - please read the Posting Guidelines, in particular the item 9, which you violated.

If you upload screenshots to MR as attachments, they will be shown as thumbnails after the post text, or you can place them inline by selecting them from the Advance Mode paper clip drop down.

Thanks BR
BetterRed is offline   Reply With Quote
Old 06-28-2018, 10:20 AM   #24
stragnagn
Junior Member
stragnagn began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2013
Device: Kobo
Thanks again Becky.

I've installed your zip file but nothing changed: no item found (log below).

This could be something related to different Google HTML results given for different countries?

I do not know how to debug more.


calibre, version 3.21.0
ERRORE: Nessuna corrispondenza trovata: <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:
{u'authors': [u'Alan Nourse'], u'identifiers': {}, u'timeout': 30, u'title': u'I Mercenari'}
Using plugins: MondoUrania (0, 2, 1)
The log from individual plugins is below

****************************** MondoUrania (0, 2, 1) ******************************
Found 0 results
Downloading from MondoUrania took 0.886838197708
Querying: http://www.google.com/custom?as_site...ri+Alan+Nourse
Plugin MondoUrania failed
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/ebooks/metadata/sources/identify.py", line 48, in run
self.plugin.identify(self.log, self.rq, self.abort, **self.kwargs)
File "calibre_plugins.MondoUrania.__init__", line 140, in identify
File "/usr/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 199, in open_novisit
return self._mech_open(url, data, visit=False, timeout=timeout)
File "/usr/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 255, in _mech_open
raise response
httperror_seek_wrapper: HTTP Error 503: Service Unavailable

************************************************** ******************************
The identify phase took 1.00 seconds
The longest time (0.886838) was taken by: MondoUrania
Merging results from different sources and finding earliest publication dates from the worldcat.org service
We have 0 merged results, merging took: 0.00 seconds
stragnagn is offline   Reply With Quote
Old 06-28-2018, 01:12 PM   #25
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 687
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
Quote:
Originally Posted by stragnagn View Post
httperror_seek_wrapper: HTTP Error 503: Service Unavailable
I have no idea.
Google unavailable?
Try several times at different hours.
BeckyEbook is offline   Reply With Quote
Old 06-30-2018, 11:01 AM   #26
webwizard
Member
webwizard began at the beginning.
 
webwizard's Avatar
 
Posts: 20
Karma: 10
Join Date: Feb 2011
Device: Kindle DX
Actually it could be a temporary problem with Google. I tried the query string and the result was OK:

1 risultato (0,21 secondi)
Risultati di ricerca
i mercenari - Mondourania
http://www.mondourania.com/urania/u8.../urania873.htm
1 feb 1981 - ALAN E. NOURSE ... venduto il proprio corpo al Centro, i mercenari della medicina perdono ogni diritto: sono diventati cavie da esperimenti.
Al fine di visualizzare i risultati più pertinenti, sono state omesse alcune voci molto simili alle 1 già visualizzate.
Se vuoi, puoi ripetere la ricerca includendo i risultati omessi.

Alcuni risultati possono essere stati rimossi nell'ambito della normativa europea sulla protezione dei dati. Ulteriori informazioni...

...and so on.
webwizard is offline   Reply With Quote
Old 07-03-2018, 07:04 AM   #27
Pr.BarnArt
Addict
Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.
 
Pr.BarnArt's Avatar
 
Posts: 381
Karma: 401800
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad air/ kindle paperwhite
Made a new update 2.2 .
Thx toBeckyEbook
Available at the start of this thread

I cannot duplicate the error stragnagn has mentioned.
The link in his post produces the right webpage.
Pr.BarnArt is offline   Reply With Quote
Old 05-20-2020, 04:45 AM   #28
Waylander63
Junior Member
Waylander63 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2020
Device: Ipad, Kindle PPW
Plugin not working

Hello there,

My very first post in this forum as I'm looking for help.
With the lockdown, I've resumed maintenance of my Calibre library which has been neglected for a long time.
This plugin used to be one of the most useful as I own a lot of this series.
Now, apparently, the plugin is consistently unable to find results, regardless of the title and despite the source site layout hasn't changed AFAIK.

I'm not so phyton-wise to debug it by myself, however, I volunteer for testing or whatever I can do to help.

Thanks in advance for any support.
Waylander

Below an actual example of the log.

Running identify query with parameters:
{u'identifiers': {u'customidentifier': u'URANIA 707'}, u'timeout': 30, u'title': u'Condominium', u'authors': [u'J. G. Ballard']}
Using plugins: MondoUrania (0, 2, 2), Google (1, 0, 1), Amazon.com (1, 2, 12)
The log from individual plugins is below

****************************** MondoUrania (0, 2, 2) ******************************
Found 0 results
Downloading from MondoUrania took 5.64699983597
Querying: http://www.google.com/custom?as_site...minium+Ballard
No matches found with identifiers, retrying using only title and authors
Querying: http://www.google.com/custom?as_site...minium+Ballard
No matches found with query: u'http://www.google.com/custom?as_sitesearch=mondourania.com&hl=it&q=Condo minium+Ballard'
Waylander63 is offline   Reply With Quote
Old 06-03-2020, 03:27 PM   #29
Pr.BarnArt
Addict
Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.Pr.BarnArt ought to be getting tired of karma fortunes by now.
 
Pr.BarnArt's Avatar
 
Posts: 381
Karma: 401800
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad air/ kindle paperwhite
Quote:
Originally Posted by Waylander63 View Post
Hello there,

This plugin used to be one of the most useful as I own a lot of this series.
Now, apparently, the plugin is consistently unable to find results, regardless of the title and despite the source site layout hasn't changed AFAIK.


Running identify query with parameters:
{u'identifiers': {u'customidentifier': u'URANIA 707'}, u'timeout': 30, u'title': u'Condominium', u'authors': [u'J. G. Ballard']}
Hi, sorry for the late rrsponse, it's due to the corona.
I made quick fix, but did not test it through and through.
I expected more difficulties because the plugin was from july 2018. And that would be a long periode without any changes. But it seems to work after a small change in the code.

So give it a try, test it and enjoy.
Update 0.2.3 available at the start of this thread.

Last edited by Pr.BarnArt; 06-03-2020 at 03:30 PM.
Pr.BarnArt is offline   Reply With Quote
Old 06-10-2020, 07:56 AM   #30
Waylander63
Junior Member
Waylander63 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2020
Device: Ipad, Kindle PPW
Quote:
Originally Posted by Pr.BarnArt View Post
Hi, sorry for the late rrsponse, it's due to the corona.
I made quick fix, but did not test it through and through.
I expected more difficulties because the plugin was from july 2018. And that would be a long periode without any changes. But it seems to work after a small change in the code.

So give it a try, test it and enjoy.
Update 0.2.3 available at the start of this thread.
Thank you!
Just tested and works like a charm.
Really appreciated!

Stay safe!
Waylander
Waylander63 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Metadata Source Plugin] FictionDB kiwidude Plugins 129 03-16-2024 11:14 PM
[Metadata Source Plugin] Libri.hu kloon Plugins 27 02-25-2024 01:27 PM
[Metadata Source Plugin] DatabazeKnih (cz) baghira Plugins 240 10-08-2023 05:13 AM
[Metadata Source Plugin] BOL.com (DE) Pr.BarnArt Plugins 52 06-01-2023 04:50 PM
Plugin Request for MondoUrania.com stragnagn Plugins 3 10-27-2013 01:50 PM


All times are GMT -4. The time now is 11:49 PM.


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