mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
...
This commit is contained in:
parent
51bc836d19
commit
6c7fff344b
@ -3,6 +3,8 @@ https://www.economist.com/the-world-in-brief
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||||
|
from calibre.ebooks.BeautifulSoup import Tag
|
||||||
|
|
||||||
|
|
||||||
def new_tag(soup, name, attrs=()):
|
def new_tag(soup, name, attrs=()):
|
||||||
impl = getattr(soup, 'new_tag', None)
|
impl = getattr(soup, 'new_tag', None)
|
||||||
@ -10,6 +12,7 @@ def new_tag(soup, name, attrs=()):
|
|||||||
return impl(name, attrs=dict(attrs))
|
return impl(name, attrs=dict(attrs))
|
||||||
return Tag(soup, name, attrs=attrs or None)
|
return Tag(soup, name, attrs=attrs or None)
|
||||||
|
|
||||||
|
|
||||||
class Espresso(BasicNewsRecipe):
|
class Espresso(BasicNewsRecipe):
|
||||||
title = 'The Economist Espresso'
|
title = 'The Economist Espresso'
|
||||||
language = 'en'
|
language = 'en'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user