mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
merge changes from lp:~cbhaley/calibre/charles_store.
This commit is contained in:
commit
d41491082a
@ -7,6 +7,7 @@ __license__ = 'GPL 3'
|
|||||||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
|
import re
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
from lxml import html
|
from lxml import html
|
||||||
|
|
||||||
@ -49,7 +50,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
asin_xpath = '@name'
|
asin_xpath = '@name'
|
||||||
cover_xpath = './/img[@class="productImage"]/@src'
|
cover_xpath = './/img[@class="productImage"]/@src'
|
||||||
title_xpath = './/h3[@class="newaps"]/a//text()'
|
title_xpath = './/h3[@class="newaps"]/a//text()'
|
||||||
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]/text()'
|
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
|
||||||
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
||||||
|
|
||||||
for data in doc.xpath(data_xpath):
|
for data in doc.xpath(data_xpath):
|
||||||
@ -57,7 +58,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# Even though we are searching digital-text only Amazon will still
|
# Even though we are searching digital-text only Amazon will still
|
||||||
# put in results for non Kindle books (author pages). Se we need
|
# put in results for non Kindle books (authors pages). Se we need
|
||||||
# to explicitly check if the item is a Kindle book and ignore it
|
# to explicitly check if the item is a Kindle book and ignore it
|
||||||
# if it isn't.
|
# if it isn't.
|
||||||
format_ = ''.join(data.xpath(format_xpath))
|
format_ = ''.join(data.xpath(format_xpath))
|
||||||
@ -75,12 +76,13 @@ class AmazonEUBase(StorePlugin):
|
|||||||
cover_url = ''.join(data.xpath(cover_xpath))
|
cover_url = ''.join(data.xpath(cover_xpath))
|
||||||
|
|
||||||
title = ''.join(data.xpath(title_xpath))
|
title = ''.join(data.xpath(title_xpath))
|
||||||
author = ''.join(data.xpath(author_xpath))
|
|
||||||
try:
|
authors = ''.join(data.xpath(author_xpath))
|
||||||
if self.author_article:
|
authors = re.sub('^' + self.author_article, '', authors)
|
||||||
author = author.split(self.author_article, 1)[1].split(" (")[0]
|
authors = re.sub(self.and_word, ' & ', authors)
|
||||||
except:
|
mo = re.match(r'(.*)(\(\d.*)$', authors)
|
||||||
pass
|
if mo:
|
||||||
|
authors = mo.group(1).strip()
|
||||||
|
|
||||||
price = ''.join(data.xpath(price_xpath))
|
price = ''.join(data.xpath(price_xpath))
|
||||||
|
|
||||||
@ -89,7 +91,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
s = SearchResult()
|
s = SearchResult()
|
||||||
s.cover_url = cover_url.strip()
|
s.cover_url = cover_url.strip()
|
||||||
s.title = title.strip()
|
s.title = title.strip()
|
||||||
s.author = author.strip()
|
s.author = authors.strip()
|
||||||
s.price = price.strip()
|
s.price = price.strip()
|
||||||
s.detail_item = asin.strip()
|
s.detail_item = asin.strip()
|
||||||
s.drm = SearchResult.DRM_UNKNOWN
|
s.drm = SearchResult.DRM_UNKNOWN
|
||||||
@ -115,3 +117,5 @@ class AmazonDEKindleStore(AmazonEUBase):
|
|||||||
search_url = 'http://www.amazon.de/s/?url=search-alias%3Ddigital-text&field-keywords='
|
search_url = 'http://www.amazon.de/s/?url=search-alias%3Ddigital-text&field-keywords='
|
||||||
|
|
||||||
author_article = 'von '
|
author_article = 'von '
|
||||||
|
|
||||||
|
and_word = ' und '
|
@ -7,6 +7,7 @@ __license__ = 'GPL 3'
|
|||||||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
|
import re
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
from lxml import html
|
from lxml import html
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
asin_xpath = '@name'
|
asin_xpath = '@name'
|
||||||
cover_xpath = './/img[@class="productImage"]/@src'
|
cover_xpath = './/img[@class="productImage"]/@src'
|
||||||
title_xpath = './/h3[@class="newaps"]/a//text()'
|
title_xpath = './/h3[@class="newaps"]/a//text()'
|
||||||
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]/text()'
|
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
|
||||||
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
||||||
|
|
||||||
for data in doc.xpath(data_xpath):
|
for data in doc.xpath(data_xpath):
|
||||||
@ -56,7 +57,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# Even though we are searching digital-text only Amazon will still
|
# Even though we are searching digital-text only Amazon will still
|
||||||
# put in results for non Kindle books (author pages). Se we need
|
# put in results for non Kindle books (authors pages). Se we need
|
||||||
# to explicitly check if the item is a Kindle book and ignore it
|
# to explicitly check if the item is a Kindle book and ignore it
|
||||||
# if it isn't.
|
# if it isn't.
|
||||||
format_ = ''.join(data.xpath(format_xpath))
|
format_ = ''.join(data.xpath(format_xpath))
|
||||||
@ -74,12 +75,13 @@ class AmazonEUBase(StorePlugin):
|
|||||||
cover_url = ''.join(data.xpath(cover_xpath))
|
cover_url = ''.join(data.xpath(cover_xpath))
|
||||||
|
|
||||||
title = ''.join(data.xpath(title_xpath))
|
title = ''.join(data.xpath(title_xpath))
|
||||||
author = ''.join(data.xpath(author_xpath))
|
|
||||||
try:
|
authors = ''.join(data.xpath(author_xpath))
|
||||||
if self.author_article:
|
authors = re.sub('^' + self.author_article, '', authors)
|
||||||
author = author.split(self.author_article, 1)[1].split(" (")[0]
|
authors = re.sub(self.and_word, ' & ', authors)
|
||||||
except:
|
mo = re.match(r'(.*)(\(\d.*)$', authors)
|
||||||
pass
|
if mo:
|
||||||
|
authors = mo.group(1).strip()
|
||||||
|
|
||||||
price = ''.join(data.xpath(price_xpath))
|
price = ''.join(data.xpath(price_xpath))
|
||||||
|
|
||||||
@ -88,7 +90,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
s = SearchResult()
|
s = SearchResult()
|
||||||
s.cover_url = cover_url.strip()
|
s.cover_url = cover_url.strip()
|
||||||
s.title = title.strip()
|
s.title = title.strip()
|
||||||
s.author = author.strip()
|
s.author = authors.strip()
|
||||||
s.price = price.strip()
|
s.price = price.strip()
|
||||||
s.detail_item = asin.strip()
|
s.detail_item = asin.strip()
|
||||||
s.drm = SearchResult.DRM_UNKNOWN
|
s.drm = SearchResult.DRM_UNKNOWN
|
||||||
@ -113,3 +115,5 @@ class AmazonESKindleStore(AmazonEUBase):
|
|||||||
search_url = 'http://www.amazon.es/s/?url=search-alias%3Ddigital-text&field-keywords='
|
search_url = 'http://www.amazon.es/s/?url=search-alias%3Ddigital-text&field-keywords='
|
||||||
|
|
||||||
author_article = 'de '
|
author_article = 'de '
|
||||||
|
|
||||||
|
and_word = ' y '
|
@ -7,7 +7,7 @@ __license__ = 'GPL 3'
|
|||||||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
|
import re
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
from lxml import html
|
from lxml import html
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
asin_xpath = '@name'
|
asin_xpath = '@name'
|
||||||
cover_xpath = './/img[@class="productImage"]/@src'
|
cover_xpath = './/img[@class="productImage"]/@src'
|
||||||
title_xpath = './/h3[@class="newaps"]/a//text()'
|
title_xpath = './/h3[@class="newaps"]/a//text()'
|
||||||
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]/text()'
|
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
|
||||||
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
||||||
|
|
||||||
for data in doc.xpath(data_xpath):
|
for data in doc.xpath(data_xpath):
|
||||||
@ -58,7 +58,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# Even though we are searching digital-text only Amazon will still
|
# Even though we are searching digital-text only Amazon will still
|
||||||
# put in results for non Kindle books (author pages). Se we need
|
# put in results for non Kindle books (authors pages). Se we need
|
||||||
# to explicitly check if the item is a Kindle book and ignore it
|
# to explicitly check if the item is a Kindle book and ignore it
|
||||||
# if it isn't.
|
# if it isn't.
|
||||||
format_ = ''.join(data.xpath(format_xpath))
|
format_ = ''.join(data.xpath(format_xpath))
|
||||||
@ -76,12 +76,13 @@ class AmazonEUBase(StorePlugin):
|
|||||||
cover_url = ''.join(data.xpath(cover_xpath))
|
cover_url = ''.join(data.xpath(cover_xpath))
|
||||||
|
|
||||||
title = ''.join(data.xpath(title_xpath))
|
title = ''.join(data.xpath(title_xpath))
|
||||||
author = ''.join(data.xpath(author_xpath))
|
|
||||||
try:
|
authors = ''.join(data.xpath(author_xpath))
|
||||||
if self.author_article:
|
authors = re.sub('^' + self.author_article, '', authors)
|
||||||
author = author.split(self.author_article, 1)[1].split(" (")[0]
|
authors = re.sub(self.and_word, ' & ', authors)
|
||||||
except:
|
mo = re.match(r'(.*)(\(\d.*)$', authors)
|
||||||
pass
|
if mo:
|
||||||
|
authors = mo.group(1).strip()
|
||||||
|
|
||||||
price = ''.join(data.xpath(price_xpath))
|
price = ''.join(data.xpath(price_xpath))
|
||||||
|
|
||||||
@ -90,7 +91,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
s = SearchResult()
|
s = SearchResult()
|
||||||
s.cover_url = cover_url.strip()
|
s.cover_url = cover_url.strip()
|
||||||
s.title = title.strip()
|
s.title = title.strip()
|
||||||
s.author = author.strip()
|
s.author = authors.strip()
|
||||||
s.price = price.strip()
|
s.price = price.strip()
|
||||||
s.detail_item = asin.strip()
|
s.detail_item = asin.strip()
|
||||||
s.drm = SearchResult.DRM_UNKNOWN
|
s.drm = SearchResult.DRM_UNKNOWN
|
||||||
@ -112,3 +113,5 @@ class AmazonFRKindleStore(AmazonEUBase):
|
|||||||
search_url = 'http://www.amazon.fr/s/?url=search-alias%3Ddigital-text&field-keywords='
|
search_url = 'http://www.amazon.fr/s/?url=search-alias%3Ddigital-text&field-keywords='
|
||||||
|
|
||||||
author_article = 'de '
|
author_article = 'de '
|
||||||
|
|
||||||
|
and_word = ' et '
|
||||||
|
@ -7,6 +7,7 @@ __license__ = 'GPL 3'
|
|||||||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
|
import re
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
from lxml import html
|
from lxml import html
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
asin_xpath = '@name'
|
asin_xpath = '@name'
|
||||||
cover_xpath = './/img[@class="productImage"]/@src'
|
cover_xpath = './/img[@class="productImage"]/@src'
|
||||||
title_xpath = './/h3[@class="newaps"]/a//text()'
|
title_xpath = './/h3[@class="newaps"]/a//text()'
|
||||||
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]/text()'
|
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
|
||||||
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
||||||
|
|
||||||
for data in doc.xpath(data_xpath):
|
for data in doc.xpath(data_xpath):
|
||||||
@ -56,7 +57,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# Even though we are searching digital-text only Amazon will still
|
# Even though we are searching digital-text only Amazon will still
|
||||||
# put in results for non Kindle books (author pages). Se we need
|
# put in results for non Kindle books (authors pages). Se we need
|
||||||
# to explicitly check if the item is a Kindle book and ignore it
|
# to explicitly check if the item is a Kindle book and ignore it
|
||||||
# if it isn't.
|
# if it isn't.
|
||||||
format_ = ''.join(data.xpath(format_xpath))
|
format_ = ''.join(data.xpath(format_xpath))
|
||||||
@ -74,12 +75,13 @@ class AmazonEUBase(StorePlugin):
|
|||||||
cover_url = ''.join(data.xpath(cover_xpath))
|
cover_url = ''.join(data.xpath(cover_xpath))
|
||||||
|
|
||||||
title = ''.join(data.xpath(title_xpath))
|
title = ''.join(data.xpath(title_xpath))
|
||||||
author = ''.join(data.xpath(author_xpath))
|
|
||||||
try:
|
authors = ''.join(data.xpath(author_xpath))
|
||||||
if self.author_article:
|
authors = re.sub('^' + self.author_article, '', authors)
|
||||||
author = author.split(self.author_article, 1)[1].split(" (")[0]
|
authors = re.sub(self.and_word, ' & ', authors)
|
||||||
except:
|
mo = re.match(r'(.*)(\(\d.*)$', authors)
|
||||||
pass
|
if mo:
|
||||||
|
authors = mo.group(1).strip()
|
||||||
|
|
||||||
price = ''.join(data.xpath(price_xpath))
|
price = ''.join(data.xpath(price_xpath))
|
||||||
|
|
||||||
@ -88,7 +90,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
s = SearchResult()
|
s = SearchResult()
|
||||||
s.cover_url = cover_url.strip()
|
s.cover_url = cover_url.strip()
|
||||||
s.title = title.strip()
|
s.title = title.strip()
|
||||||
s.author = author.strip()
|
s.author = authors.strip()
|
||||||
s.price = price.strip()
|
s.price = price.strip()
|
||||||
s.detail_item = asin.strip()
|
s.detail_item = asin.strip()
|
||||||
s.drm = SearchResult.DRM_UNKNOWN
|
s.drm = SearchResult.DRM_UNKNOWN
|
||||||
@ -99,7 +101,6 @@ class AmazonEUBase(StorePlugin):
|
|||||||
def get_details(self, search_result, timeout):
|
def get_details(self, search_result, timeout):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AmazonITKindleStore(AmazonEUBase):
|
class AmazonITKindleStore(AmazonEUBase):
|
||||||
'''
|
'''
|
||||||
For comments on the implementation, please see amazon_plugin.py
|
For comments on the implementation, please see amazon_plugin.py
|
||||||
@ -114,3 +115,5 @@ class AmazonITKindleStore(AmazonEUBase):
|
|||||||
search_url = 'http://www.amazon.it/s/?url=search-alias%3Ddigital-text&field-keywords='
|
search_url = 'http://www.amazon.it/s/?url=search-alias%3Ddigital-text&field-keywords='
|
||||||
|
|
||||||
author_article = 'di '
|
author_article = 'di '
|
||||||
|
|
||||||
|
and_word = ' e '
|
@ -7,6 +7,7 @@ __license__ = 'GPL 3'
|
|||||||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
|
import re
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
from lxml import html
|
from lxml import html
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
asin_xpath = '@name'
|
asin_xpath = '@name'
|
||||||
cover_xpath = './/img[@class="productImage"]/@src'
|
cover_xpath = './/img[@class="productImage"]/@src'
|
||||||
title_xpath = './/h3[@class="newaps"]/a//text()'
|
title_xpath = './/h3[@class="newaps"]/a//text()'
|
||||||
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]/text()'
|
author_xpath = './/h3[@class="newaps"]//span[contains(@class, "reg")]//text()'
|
||||||
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
price_xpath = './/ul[contains(@class, "rsltL")]//span[contains(@class, "lrg") and contains(@class, "bld")]/text()'
|
||||||
|
|
||||||
for data in doc.xpath(data_xpath):
|
for data in doc.xpath(data_xpath):
|
||||||
@ -56,7 +57,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# Even though we are searching digital-text only Amazon will still
|
# Even though we are searching digital-text only Amazon will still
|
||||||
# put in results for non Kindle books (author pages). Se we need
|
# put in results for non Kindle books (authors pages). Se we need
|
||||||
# to explicitly check if the item is a Kindle book and ignore it
|
# to explicitly check if the item is a Kindle book and ignore it
|
||||||
# if it isn't.
|
# if it isn't.
|
||||||
format_ = ''.join(data.xpath(format_xpath))
|
format_ = ''.join(data.xpath(format_xpath))
|
||||||
@ -74,12 +75,13 @@ class AmazonEUBase(StorePlugin):
|
|||||||
cover_url = ''.join(data.xpath(cover_xpath))
|
cover_url = ''.join(data.xpath(cover_xpath))
|
||||||
|
|
||||||
title = ''.join(data.xpath(title_xpath))
|
title = ''.join(data.xpath(title_xpath))
|
||||||
author = ''.join(data.xpath(author_xpath))
|
|
||||||
try:
|
authors = ''.join(data.xpath(author_xpath))
|
||||||
if self.author_article:
|
authors = re.sub('^' + self.author_article, '', authors)
|
||||||
author = author.split(self.author_article, 1)[1].split(" (")[0]
|
authors = re.sub(self.and_word, ' & ', authors)
|
||||||
except:
|
mo = re.match(r'(.*)(\(\d.*)$', authors)
|
||||||
pass
|
if mo:
|
||||||
|
authors = mo.group(1).strip()
|
||||||
|
|
||||||
price = ''.join(data.xpath(price_xpath))
|
price = ''.join(data.xpath(price_xpath))
|
||||||
|
|
||||||
@ -88,7 +90,7 @@ class AmazonEUBase(StorePlugin):
|
|||||||
s = SearchResult()
|
s = SearchResult()
|
||||||
s.cover_url = cover_url.strip()
|
s.cover_url = cover_url.strip()
|
||||||
s.title = title.strip()
|
s.title = title.strip()
|
||||||
s.author = author.strip()
|
s.author = authors.strip()
|
||||||
s.price = price.strip()
|
s.price = price.strip()
|
||||||
s.detail_item = asin.strip()
|
s.detail_item = asin.strip()
|
||||||
s.drm = SearchResult.DRM_UNKNOWN
|
s.drm = SearchResult.DRM_UNKNOWN
|
||||||
@ -112,3 +114,5 @@ class AmazonUKKindleStore(AmazonEUBase):
|
|||||||
|
|
||||||
author_article = 'by '
|
author_article = 'by '
|
||||||
|
|
||||||
|
and_word = ' and '
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class FoylesUKStore(BasicStoreConfig, StorePlugin):
|
|||||||
d.exec_()
|
d.exec_()
|
||||||
|
|
||||||
def search(self, query, max_results=10, timeout=60):
|
def search(self, query, max_results=10, timeout=60):
|
||||||
url = 'http://ebooks.foyles.co.uk/search_for-' + urllib2.quote(query)
|
url = 'http://ebooks.foyles.co.uk/catalog/search/?query=' + urllib2.quote(query)
|
||||||
|
|
||||||
br = browser()
|
br = browser()
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ class FoylesUKStore(BasicStoreConfig, StorePlugin):
|
|||||||
cover_url = ''.join(data.xpath('.//p[@class="doc-cover"]/a/img/@src'))
|
cover_url = ''.join(data.xpath('.//p[@class="doc-cover"]/a/img/@src'))
|
||||||
title = ''.join(data.xpath('.//span[@class="title"]/a/text()'))
|
title = ''.join(data.xpath('.//span[@class="title"]/a/text()'))
|
||||||
author = ', '.join(data.xpath('.//span[@class="author"]/span[@class="author"]/text()'))
|
author = ', '.join(data.xpath('.//span[@class="author"]/span[@class="author"]/text()'))
|
||||||
price = ''.join(data.xpath('.//span[@class="price"]/text()'))
|
price = ''.join(data.xpath('.//span[@itemprop="price"]/text()'))
|
||||||
format_ = ''.join(data.xpath('.//p[@class="doc-meta-format"]/span[last()]/text()'))
|
format_ = ''.join(data.xpath('.//p[@class="doc-meta-format"]/span[last()]/text()'))
|
||||||
format_, ign, drm = format_.partition(' ')
|
format_, ign, drm = format_.partition(' ')
|
||||||
drm = SearchResult.DRM_LOCKED if 'DRM' in drm else SearchResult.DRM_UNLOCKED
|
drm = SearchResult.DRM_LOCKED if 'DRM' in drm else SearchResult.DRM_UNLOCKED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user