diff --git a/lib/routes/bing/daily-wallpaper.ts b/lib/routes/bing/daily-wallpaper.ts
index 2a6a3d9072..7d6051b78d 100644
--- a/lib/routes/bing/daily-wallpaper.ts
+++ b/lib/routes/bing/daily-wallpaper.ts
@@ -57,7 +57,7 @@ async function handler(ctx) {
const items = resp.MediaContents.map((item) => {
const ssd = item.Ssd;
const link = `${apiUrl}${item.ImageContent.Image.Url.match(/\/th\?id=[^_]+_[^_]+/)[0].replace(/(_\d+x\d+\.webp)$/i, '')}_${type}.jpg`;
- let description = `
`;
+ let description = `
`;
if (story) {
description += `${item.ImageContent.Headline}`;
description += `${item.ImageContent.QuickFact.MainText}
`;
diff --git a/lib/routes/pixiv/utils.ts b/lib/routes/pixiv/utils.ts
index 64b0ba0c5c..824f742e3a 100644
--- a/lib/routes/pixiv/utils.ts
+++ b/lib/routes/pixiv/utils.ts
@@ -2,15 +2,15 @@ import { config } from '@/config';
export default {
getImgs(illust) {
- const images = [];
+ const images: string[] = [];
if (illust.meta_pages?.length) {
for (const page of illust.meta_pages) {
const original = page.image_urls.original.replace('https://i.pximg.net', config.pixiv.imgProxy);
- images.push(`

`);
+ images.push(`
`);
}
} else if (illust.meta_single_page.original_image_url) {
const original = illust.meta_single_page.original_image_url.replace('https://i.pximg.net', config.pixiv.imgProxy);
- images.push(`
`);
+ images.push(`
`);
}
return images;
},
diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts
index dcdd62e252..e5e83a6031 100644
--- a/lib/routes/telegram/channel.ts
+++ b/lib/routes/telegram/channel.ts
@@ -428,7 +428,9 @@ async function handler(ctx) {
const background = $node.css('background-image');
const backgroundUrl = background && background.match(/url\('(.*)'\)/);
const backgroundUrlSrc = backgroundUrl && backgroundUrl[1];
- tag_media += backgroundUrlSrc ? `
` : '';
+ const width = Number.parseFloat($node.css('width') || '0');
+ const height = ((Number.parseFloat($node.find('.tgme_widget_message_photo').css('padding-top') || '0') / 100) * width).toFixed(2);
+ tag_media += backgroundUrlSrc ? `
` : '';
}
if (tag_media) {
tag_media_all += tag_media;
diff --git a/lib/routes/twitter/utils.ts b/lib/routes/twitter/utils.ts
index 7a0c4413a1..90d266b739 100644
--- a/lib/routes/twitter/utils.ts
+++ b/lib/routes/twitter/utils.ts
@@ -104,7 +104,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
if (!readable) {
content += '
';
}
- content += ``;
+ content += ``;
}
return content;
@@ -142,6 +142,9 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
content += `height="${heightOfPics}" `;
style += `height: ${heightOfPics}px;`;
}
+ if (widthOfPics <= 0 && heightOfPics <= 0) {
+ content += `width="${media.sizes.large.w}" height="${media.sizes.large.h}" `;
+ }
content += ` style="${style}" ` + `${readable ? 'hspace="4" vspace="8"' : ''} src="${originalImg}">`;
if (addLinkForPics) {
content += ``;