mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-04 02:26:11 +08:00
fix chromium
This commit is contained in:
parent
2178f9667f
commit
8d02c8f22a
@ -1,6 +1,6 @@
|
|||||||
FROM python:3.9
|
FROM python:3.9
|
||||||
RUN echo "deb http://mirrors.aliyun.com/debian/ buster main contrib non-free\ndeb http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free" > /etc/apt/sources.list && \
|
RUN echo "deb http://mirrors.aliyun.com/debian/ buster main contrib non-free\ndeb http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free" > /etc/apt/sources.list && \
|
||||||
apt-get update && apt-get install -y fonts-wqy-microhei
|
apt-get update && apt-get install -y fonts-wqy-microhei chromium
|
||||||
RUN python3 -m pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
|
RUN python3 -m pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
|
||||||
RUN python3 -m pip install poetry && poetry config virtualenvs.create false
|
RUN python3 -m pip install poetry && poetry config virtualenvs.create false
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -21,9 +21,9 @@ class Render(metaclass=Singleton):
|
|||||||
|
|
||||||
async def init(self):
|
async def init(self):
|
||||||
if plugin_config.hk_reporter_use_local:
|
if plugin_config.hk_reporter_use_local:
|
||||||
browser = await launch(executablePath='/usr/bin/chromium')
|
browser = await launch(executablePath='/usr/bin/chromium', args=['--no-sandbox'])
|
||||||
else:
|
else:
|
||||||
browser = await launch()
|
browser = await launch(args=['--no-sandbox'])
|
||||||
self.page = await browser.newPage()
|
self.page = await browser.newPage()
|
||||||
|
|
||||||
async def text_to_pic(self, text: str) -> str:
|
async def text_to_pic(self, text: str) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user