mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
add pixiv support
This commit is contained in:
+5
-1
@@ -1,7 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .net import NetClient
|
||||
from .regex import x_url
|
||||
from .pixiv import TelegramPixiv
|
||||
from .regex import pixiv_url, x_url
|
||||
from .tweet import TelegramTweet
|
||||
|
||||
|
||||
@@ -13,6 +14,9 @@ class Telegram(NetClient):
|
||||
if x_url.match(self._url):
|
||||
async with TelegramTweet(self._url) as tweet:
|
||||
return tweet
|
||||
elif pixiv_url.match(self._url):
|
||||
async with TelegramPixiv(self._url) as pixiv:
|
||||
return pixiv
|
||||
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user