mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'patch-1' of https://github.com/felagund/calibre
This commit is contained in:
commit
f32f8a393b
@ -12,14 +12,13 @@ from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||
# This imports the version bundled with Calibre
|
||||
import lxml
|
||||
from lxml.builder import E
|
||||
respekt_url = 'http://www.respekt.cz'
|
||||
|
||||
respekt_url = 'https://www.respekt.cz'
|
||||
|
||||
class respektRecipe(BasicNewsRecipe):
|
||||
__author__ = 'Tomáš Hnyk'
|
||||
publisher = u'Respekt Publishing a. s.'
|
||||
description = u'Articles from the print edition'
|
||||
title = u'Respekt Magazine – Print'
|
||||
title = u'Respekt Magazine — Print'
|
||||
encoding = 'utf-8'
|
||||
language = 'cs'
|
||||
delay = 0.001
|
||||
@ -74,10 +73,10 @@ class respektRecipe(BasicNewsRecipe):
|
||||
return raw_html
|
||||
|
||||
def parse_index(self):
|
||||
raw1 = self.index_to_soup('http://www.respekt.cz/tydenik/', raw=True)
|
||||
raw1 = self.index_to_soup('https://www.respekt.cz/tydenik/', raw=True)
|
||||
root1 = lxml.html.fromstring(raw1)
|
||||
current_edition_url = root1.xpath("//div[@class='heroissue']/a")[0].items()[0][1]
|
||||
raw2 = self.index_to_soup('http://www.respekt.cz/' + current_edition_url, raw=True)
|
||||
raw2 = self.index_to_soup('https://www.respekt.cz/' + current_edition_url, raw=True)
|
||||
root2 = lxml.html.fromstring(raw2)
|
||||
self.cover_url = root2.xpath("//i[contains(@class, 'heroissue-cover')]")[0].get("data-src")
|
||||
# Fetch date
|
||||
|
Loading…
x
Reference in New Issue
Block a user