mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Add version no and fix all URLs
This commit is contained in:
parent
32d5aa6fbb
commit
6eb16adc97
@ -17,6 +17,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
|||||||
title_with_date = 'Private Eye Online'
|
title_with_date = 'Private Eye Online'
|
||||||
title_author = 'Private Eye'
|
title_author = 'Private Eye'
|
||||||
__author__ = 'Sophist at sodalis.co.uk'
|
__author__ = 'Sophist at sodalis.co.uk'
|
||||||
|
version = 2.10
|
||||||
issue_no = ''
|
issue_no = ''
|
||||||
description = '''Private Eye is a fortnightly British satirical news and current affairs magazine,\
|
description = '''Private Eye is a fortnightly British satirical news and current affairs magazine,\
|
||||||
edited by Ian Hislop, offering a unique blend of humour, social and political observations and\
|
edited by Ian Hislop, offering a unique blend of humour, social and political observations and\
|
||||||
@ -32,7 +33,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
|||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
ignore_duplicate_articles = {'url'}
|
ignore_duplicate_articles = {'url'}
|
||||||
|
|
||||||
conversion_options = {
|
conn_options = {
|
||||||
'authors': title_author,
|
'authors': title_author,
|
||||||
'author_sort': title_author,
|
'author_sort': title_author,
|
||||||
'smarten_punctuation': True,
|
'smarten_punctuation': True,
|
||||||
@ -94,7 +95,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
|||||||
|
|
||||||
# Process the Index page to get the content for the ebook
|
# Process the Index page to get the content for the ebook
|
||||||
def parse_index(self):
|
def parse_index(self):
|
||||||
self.log.info('Private Eye: Parse Index: %s' % self.INDEX)
|
self.log.info('Private Eye: v%s,Parse Index: %s' % (self.version,self.INDEX))
|
||||||
self.page_index = []
|
self.page_index = []
|
||||||
|
|
||||||
soup = self.index_to_soup(self.INDEX)
|
soup = self.index_to_soup(self.INDEX)
|
||||||
@ -224,10 +225,12 @@ It offers a unique blend of humour, social and political observations and invest
|
|||||||
for figure in soup.findAll(
|
for figure in soup.findAll(
|
||||||
'a',
|
'a',
|
||||||
attrs={'href':
|
attrs={'href':
|
||||||
lambda x: x and ('jpg' in x or 'png' in x or 'gif' in x)}):
|
lambda x: x and
|
||||||
|
(x.endswith('.jpg') or
|
||||||
|
x.endswith('.png') or x.endswith('.gif'))
|
||||||
|
}):
|
||||||
# makes sure that the link points to the absolute web address
|
# makes sure that the link points to the absolute web address
|
||||||
if figure['href'].startswith('/'):
|
figure['href'] = self.fix_url(figure['href'])
|
||||||
figure['href'] = self.fix_url(figure['href'])
|
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
def postprocess_book(self, oeb, opts, log):
|
def postprocess_book(self, oeb, opts, log):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user