mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 04:45:27 +00:00
🎨 Update timeout config of Hyperion
client
This commit is contained in:
parent
9a1b9271e7
commit
8814979cef
@ -25,8 +25,8 @@ class Hyperion:
|
||||
"Chrome/90.0.4430.72 Safari/537.36"
|
||||
)
|
||||
|
||||
def __init__(self):
|
||||
self.client = HyperionRequest(headers=self.get_headers())
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.client = HyperionRequest(headers=self.get_headers(), *args, **kwargs)
|
||||
|
||||
@staticmethod
|
||||
def extract_post_id(text: str) -> int:
|
||||
|
@ -1,6 +1,7 @@
|
||||
from typing import List, Optional, Tuple, TYPE_CHECKING, Union
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
from httpx import Timeout
|
||||
from telegram import (
|
||||
InlineKeyboardButton,
|
||||
InlineKeyboardMarkup,
|
||||
@ -47,7 +48,14 @@ class Post(Plugin.Conversation):
|
||||
MENU_KEYBOARD = ReplyKeyboardMarkup([["推送频道", "添加TAG"], ["编辑文字", "删除图片"], ["退出"]], True, True)
|
||||
|
||||
def __init__(self):
|
||||
self.bbs = Hyperion()
|
||||
self.bbs = Hyperion(
|
||||
timeout=Timeout(
|
||||
connect=config.connect_timeout,
|
||||
read=config.read_timeout,
|
||||
write=config.write_timeout,
|
||||
pool=config.pool_timeout,
|
||||
)
|
||||
)
|
||||
self.last_post_id_list: List[int] = []
|
||||
|
||||
async def initialize(self):
|
||||
|
Loading…
Reference in New Issue
Block a user