~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/gui2/store/stores/wolnelektury_plugin.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-02-27 07:48:06 UTC
  • mto: This revision was merged to the branch mainline in revision 74.
  • Revision ID: package-import@ubuntu.com-20140227074806-64wdebb3ptosxhhx
Tags: upstream-1.25.0+dfsg
Import upstream version 1.25.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- coding: utf-8 -*-
2
2
 
3
3
from __future__ import (unicode_literals, division, absolute_import, print_function)
4
 
store_version = 1  # Needed for dynamic plugin loading
 
4
store_version = 3 # Needed for dynamic plugin loading
5
5
 
6
6
__license__ = 'GPL 3'
7
 
__copyright__ = '2012-2013, Tomasz Długosz <tomek3d@gmail.com>'
 
7
__copyright__ = '2012-2014, Tomasz Długosz <tomek3d@gmail.com>'
8
8
__docformat__ = 'restructuredtext en'
9
9
 
10
10
import urllib
55
55
                if not id:
56
56
                    continue
57
57
 
58
 
                cover_url = ''.join(data.xpath('.//a[1]/img/@src'))
 
58
                cover_url = ''.join(data.xpath('.//div[@class="cover-area"]//img/@src'))
59
59
                title = ''.join(data.xpath('.//div[@class="title"]/a[1]/text()'))
60
 
                author = ', '.join(data.xpath('.//div[@class="mono author"]/a/text()'))
 
60
                author = ', '.join(data.xpath('.//div[@class="author"]/a/text()'))
61
61
                price = '0,00 zł'
62
62
 
63
63
                counter -= 1
64
64
 
65
65
                s = SearchResult()
66
 
                for link in data.xpath('.//div[@class="book-box-formats mono"]/span/a'):
 
66
                for link in data.xpath('.//div[@class="book-box-formats"]/span/a'):
67
67
                    ext = ''.join(link.xpath('./text()'))
68
68
                    href = 'http://wolnelektury.pl' + link.get('href')
69
69
                    s.downloads[ext] = href