-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/t3d/calibre
- Loading branch information
Showing
3 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import, division, print_function, unicode_literals | ||
|
||
store_version = 9 # Needed for dynamic plugin loading | ||
store_version = 10 # Needed for dynamic plugin loading | ||
|
||
__license__ = 'GPL 3' | ||
__copyright__ = '2011-2019, Tomasz Długosz <[email protected]>' | ||
__copyright__ = '2011-2023, Tomasz Długosz <[email protected]>' | ||
__docformat__ = 'restructuredtext en' | ||
|
||
from base64 import b64encode | ||
|
@@ -68,13 +68,13 @@ def search(self, query, max_results=10, timeout=60): | |
if counter <= 0: | ||
break | ||
|
||
id = ''.join(data.xpath('.//div[@class="name"]/a/@href')) | ||
id = ''.join(data.xpath('.//a[@class="img seoImage"]/@href')) | ||
if not id: | ||
continue | ||
|
||
title = ''.join(data.xpath('.//h2[@class="product-title"]/a/strong/text()')) | ||
author = ', '.join(data.xpath('.//a[@class="smartAuthor "]/text()')) | ||
cover_url = ''.join(data.xpath('.//a/img[@class="lazy"]/@lazy-img')) | ||
author = ', '.join(data.xpath('.//a[@class="smartAuthor"]/text()')) | ||
title = ''.join(data.xpath('.//div[@class="name"]/a/@title')) | ||
price = ''.join(data.xpath('.//div[@class="price ta-price-tile "]/text()')) | ||
|
||
# with closing(br.open('https://empik.com' + id.strip(), timeout=timeout/4)) as nf: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import, division, print_function, unicode_literals | ||
|
||
store_version = 11 # Needed for dynamic plugin loading | ||
store_version = 12 # Needed for dynamic plugin loading | ||
|
||
__license__ = 'GPL 3' | ||
__copyright__ = '2011-2023, Tomasz Długosz <[email protected]>' | ||
|
@@ -57,7 +57,7 @@ def open(self, parent=None, detail_item=None, external=False): | |
d.exec() | ||
|
||
def search(self, query, max_results=10, timeout=60): | ||
url = 'https://www.legimi.pl/ebooki/?sort=score&searchphrase=' + quote_plus(query) | ||
url = 'https://www.legimi.pl/ebooki/?sort=score&filters=ebooks&searchphrase=' + quote_plus(query) | ||
|
||
br = browser() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import, division, print_function, unicode_literals | ||
|
||
store_version = 11 # Needed for dynamic plugin loading | ||
store_version = 12 # Needed for dynamic plugin loading | ||
|
||
__license__ = 'GPL 3' | ||
__copyright__ = '2011-2023, Tomasz Długosz <[email protected]>' | ||
|
@@ -74,7 +74,7 @@ def search(self, query, max_results=12, timeout=60): | |
if not id: | ||
continue | ||
|
||
price = ''.join(data.xpath('.//div[@class="info"]//div[@class="price"]/text()')) | ||
price = ''.join(data.xpath('.//div[@class="info"]//div[@class="price"]/div/text()|.//div[@class="info"]//div[@class="price price--no-promo"]/div/text()')) | ||
cover_url = ''.join(data.xpath('.//img[@class="cover"]/@src')) | ||
title = ''.join(data.xpath('.//h3[@class="title"]/a//text()')) | ||
author = ', '.join(data.xpath('.//div[@class="info"]//div[@class="authors"]/a//text()')) | ||
|