fix regex match group

This commit is contained in:
2024-06-20 15:40:18 +08:00
parent 494fc50446
commit 6c0e581135
+1 -1
View File
@@ -158,7 +158,7 @@ class ProcessTweet:
async def _fetch_tweet(self) -> TweetInfo: async def _fetch_tweet(self) -> TweetInfo:
match = x_url_regex.match(self._url) match = x_url_regex.match(self._url)
assert match, f"Invalid URL: {self._url}" assert match, f"Invalid URL: {self._url}"
auther_id, tweet_id = match.group() auther_id, tweet_id = match.groups()
return await fetch_json(self._httpx_client, vx_api_url.format(auther_id, tweet_id)) return await fetch_json(self._httpx_client, vx_api_url.format(auther_id, tweet_id))
@property @property