From 61406b11f6ca213fcde22df4f7e1b48bf115fbbc Mon Sep 17 00:00:00 2001
From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com>
Date: Fri, 21 Jun 2024 12:27:12 +0530
Subject: [PATCH] wsj
---
recipes/wsj.recipe | 7 ++++---
recipes/wsj_mag.recipe | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/recipes/wsj.recipe b/recipes/wsj.recipe
index ed94662d83..958c041815 100644
--- a/recipes/wsj.recipe
+++ b/recipes/wsj.recipe
@@ -14,11 +14,11 @@ past_edition = None
def media_bucket(x):
if x.get('type', '') == 'image':
return '
{}
\n'.format(
- x['manifest-url'], x['caption'] + ' ' + x['credit']
+ x['manifest-url'], x['caption'] + ' ' + x['credit'] + ''
)
if x.get('type', '') == 'video':
- return '
{}
\n'.format(
- x['thumbnail_url'], x['caption'] + ' ' + x['credit']
+ return '
{}
\n'.format(
+ x['share_link'], x['thumbnail_url'], x['caption'] + ' ' + x['credit'] + ''
)
return
@@ -90,6 +90,7 @@ class WSJ(BasicNewsRecipe):
m_itm = soup.findAll('panel', attrs={'class':'media-item'})
if i_lst and m_itm:
for x, y in list(zip_longest(m_itm, i_lst)):
+ x.name = 'p'
x.insert_after(BeautifulSoup(y, 'html.parser'))
return soup
diff --git a/recipes/wsj_mag.recipe b/recipes/wsj_mag.recipe
index 00f5e76a91..718ee49958 100644
--- a/recipes/wsj_mag.recipe
+++ b/recipes/wsj_mag.recipe
@@ -10,11 +10,11 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes
def media_bucket(x):
if x.get('type', '') == 'image':
return '
{}
\n'.format(
- x['manifest-url'], x['caption'] + ' ' + x['credit']
+ x['manifest-url'], x['caption'] + ' ' + x['credit'] + ''
)
if x.get('type', '') == 'video':
- return '
{}
\n'.format(
- x['thumbnail_url'], x['caption'] + ' ' + x['credit']
+ return '
{}
\n'.format(
+ x['share_link'], x['thumbnail_url'], x['caption'] + ' ' + x['credit'] + ''
)
return
@@ -87,6 +87,7 @@ class WSJ(BasicNewsRecipe):
m_itm = soup.findAll('panel', attrs={'class':'media-item'})
if i_lst and m_itm:
for x, y in list(zip_longest(m_itm, i_lst)):
+ x.name = 'p'
x.insert_after(BeautifulSoup(y, 'html.parser'))
return soup