add znetwork

and icon changes 16>32 px
This commit is contained in:
unkn0w7n 2024-09-05 19:20:02 +05:30
parent a560fca0b0
commit 059b049620
18 changed files with 69 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 452 B

BIN
recipes/icons/znetwork.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

69
recipes/znetwork.recipe Normal file
View File

@ -0,0 +1,69 @@
#!/usr/bin/env python
from calibre.web.feeds.news import BasicNewsRecipe, classes
class znetwork(BasicNewsRecipe):
title = 'ZNetwork'
__author__ = 'unkn0wn'
language = 'en'
description = 'ZNetwork: Left News, Analysis, Vision & Strategy'
oldest_article = 2
no_stylesheets = True
encoding = 'utf-8'
remove_javascript = True
use_embedded_content = False
remove_attributes = ['style', 'height', 'width']
masthead_url = 'https://znetwork.org/wp-content/uploads/2022/08/Z_logo_64.png'
ignore_duplicate_articles = {'url'}
browser_type = 'qt'
recipe_specific_options = {
'days': {
'short': 'Oldest article to download from this news source. In days ',
'long': 'For example, 0.5, gives you articles from the past 12 hours',
'default': str(oldest_article)
}
}
def __init__(self, *args, **kwargs):
BasicNewsRecipe.__init__(self, *args, **kwargs)
d = self.recipe_specific_options.get('days')
if d and isinstance(d, str):
self.oldest_article = float(d)
extra_css = '''
.cat-labels { font-size:small; color:#404040; }
.post-author, .date, .author-info, .z-post-source, .read-time { font-size:small; }
.sub-title { font-style:italic; color:#202020; }
em, blockquote { color:#202020; }
.wp-caption-text, .wp-element-caption { font-size:small; text-align:center; }
'''
keep_only_tags = [
classes(
'cat-labels post-title z-post-source sub-title post-author date'
' read-time featured entry-content author-info'
)
]
remove_tags = [
dict(name=['aside', 'svg', 'source', 'iframe']),
classes('support-z-text yarpp-related yarpp-related-website')
]
remove_tags_after = [classes('author-info')]
feeds = [('Articles', 'https://znetwork.org/feed/')]
def preprocess_html(self, soup):
for spn in soup.findAll(**classes('post-author date')):
spn.string = spn.text + ' | '
div = soup.findAll(**classes('featured'))
if div:
div.name = 'p'
p = soup.findAll(**classes('sub-title'))
if p:
p.name = 'p'
for h in soup.findAll(['h2', 'h3']):
h.name = 'h4'
return soup