mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-07-04 14:19:19 +00:00
优化浏览器
This commit is contained in:
parent
c870d6605e
commit
0a43014142
@ -20,7 +20,10 @@ const screenshot = {
|
|||||||
.replace('{{feedTitle}}', feedItem.feedTitle)
|
.replace('{{feedTitle}}', feedItem.feedTitle)
|
||||||
.replace('{{image}}', feedItem.image || '');
|
.replace('{{image}}', feedItem.image || '');
|
||||||
|
|
||||||
const browser = await puppeteer.launch({ headers: 'new' });
|
const browser = await puppeteer.launch({
|
||||||
|
headers: 'new',
|
||||||
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
|
});
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
await page.setContent(html, { waitUntil: 'networkidle0' });
|
await page.setContent(html, { waitUntil: 'networkidle0' });
|
||||||
await page.setViewport({ width: 800, height: 600 });
|
await page.setViewport({ width: 800, height: 600 });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user