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: 18
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
Zealot
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: 130
Karma: 481790
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
Advert
Old 03-23-2017, 08:43 AM   #18
webwizard
Member
webwizard began at the beginning.
 
webwizard's Avatar
 
Posts: 18
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
Zealot
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: 130
Karma: 481790
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
Advert
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:	51
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
Zealot
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: 130
Karma: 481790
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, 21 views)
BeckyEbook is offline   Reply With Quote
Old 06-27-2018, 04:04 AM   #23
BetterRed
null operator
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: 11,098
Karma: 10563148
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
Zealot
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: 130
Karma: 481790
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: 18
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: 289
Karma: 400746
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
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
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] DatabazeKnih (cz) baghira Plugins 99 10-21-2018 10:45 PM
[Metadata Source Plugin] FictionDB kiwidude Plugins 72 05-21-2018 06:26 AM
[Metadata Source Plugin] BOL.com (DE) Pr.BarnArt Plugins 39 01-26-2017 06:25 AM
[Metadata Source Plugin] Libri.hu kloon Calibre 7 03-26-2016 04:07 PM
Plugin Request for MondoUrania.com stragnagn Plugins 3 10-27-2013 01:50 PM


All times are GMT -4. The time now is 02:03 AM.


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