mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'patch-6' of https://github.com/a10kiloham/calibre
This commit is contained in:
commit
754fb35426
@ -7,6 +7,12 @@ import urllib
|
|||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
|
def classes(classes):
|
||||||
|
q = frozenset(classes.split(' '))
|
||||||
|
return dict(attrs={
|
||||||
|
'class': lambda x: x and frozenset(x.split()).intersection(q)})
|
||||||
|
|
||||||
|
|
||||||
class TimesOnline(BasicNewsRecipe):
|
class TimesOnline(BasicNewsRecipe):
|
||||||
title = 'The Sunday Times Magazine UK'
|
title = 'The Sunday Times Magazine UK'
|
||||||
__author__ = 'Bobby Steel & Darko Miletic'
|
__author__ = 'Bobby Steel & Darko Miletic'
|
||||||
@ -74,9 +80,9 @@ class TimesOnline(BasicNewsRecipe):
|
|||||||
cover = None
|
cover = None
|
||||||
return cover
|
return cover
|
||||||
|
|
||||||
remove_tags = [{
|
remove_tags = [
|
||||||
'attrs': {'class': lambda x: x and 'is-hidden' in x.split()},
|
classes('Topics is-hidden Tooltip Toolbar Comments RelatedLinks'),
|
||||||
'name': ['object', 'link', 'iframe', 'base', 'meta', 'script']}, {
|
{'name': ['object', 'link', 'iframe', 'base', 'meta', 'script']}, {
|
||||||
'attrs': {
|
'attrs': {
|
||||||
'class': [
|
'class': [
|
||||||
'tools comments-parent', 'u-hide', 'Tooltip',
|
'tools comments-parent', 'u-hide', 'Tooltip',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user