mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
fix logger
This commit is contained in:
@@ -118,7 +118,6 @@ class TGTweet(Tweet):
|
|||||||
async def __aenter__(self):
|
async def __aenter__(self):
|
||||||
self._tweet: dict = await self._fetch_tweet(self._api_param)
|
self._tweet: dict = await self._fetch_tweet(self._api_param)
|
||||||
super().__init__(*self._init_properties)
|
super().__init__(*self._init_properties)
|
||||||
logger.info("Media: {0}".format(str(m) for m in self.media))
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
||||||
@@ -172,6 +171,7 @@ class TGTweet(Tweet):
|
|||||||
@property
|
@property
|
||||||
def inline_query_generator(self) -> Generator[InlineQueryResultPhoto | InlineQueryResultVideo, None, None]:
|
def inline_query_generator(self) -> Generator[InlineQueryResultPhoto | InlineQueryResultVideo, None, None]:
|
||||||
for i, tweet_media in enumerate(self.media):
|
for i, tweet_media in enumerate(self.media):
|
||||||
|
logger.info(f"Media: {str(tweet_media)}")
|
||||||
if tweet_media.type == "image":
|
if tweet_media.type == "image":
|
||||||
yield InlineQueryResultPhoto(
|
yield InlineQueryResultPhoto(
|
||||||
id=str(i),
|
id=str(i),
|
||||||
@@ -195,6 +195,7 @@ class TGTweet(Tweet):
|
|||||||
@property
|
@property
|
||||||
def pm_media_generator(self) -> Generator[InputMediaPhoto | InputMediaVideo, None, None]:
|
def pm_media_generator(self) -> Generator[InputMediaPhoto | InputMediaVideo, None, None]:
|
||||||
for tweet_media in self.media:
|
for tweet_media in self.media:
|
||||||
|
logger.info(f"Media: {str(tweet_media)}")
|
||||||
if tweet_media.type == "image":
|
if tweet_media.type == "image":
|
||||||
yield InputMediaPhoto(
|
yield InputMediaPhoto(
|
||||||
media=tweet_media.url,
|
media=tweet_media.url,
|
||||||
|
|||||||
Reference in New Issue
Block a user