diff --git a/Twitter/tweetHelper.py b/Twitter/tweetHelper.py index b8fff03..b987793 100644 --- a/Twitter/tweetHelper.py +++ b/Twitter/tweetHelper.py @@ -92,7 +92,7 @@ async def UpdateMediaPosts(account : x_accounts, botData : RuntimeBotData) -> li posts = [] try: - posts = [tweet async for tweet in botData.twApi.get_tweets(user_name = account.name, bottom_id = newest_post, all_posts = all_posts)] + posts = [tweet async for tweet in botData.twApi.get_tweets(user_id = account.id, bottom_id = newest_post, all_posts = all_posts)] except (UserProtected, UserNotFound) as ex: print("User dead: ", account.name, ex) @@ -108,7 +108,7 @@ async def DownloadAllMediaPosts(account : x_accounts, botData : RuntimeBotData) posts = [] try: - async for tweet in botData.twApi.get_tweets(user_name = account.name, bottom_id = 1, all_posts = []): + async for tweet in botData.twApi.get_tweets(user_id = account.id, bottom_id = 1, all_posts = []): if int(tweet.id) not in all_posts: posts.append(tweet) diff --git a/Twitter/tweetyapi.py b/Twitter/tweetyapi.py index c914df9..bfff8c5 100644 --- a/Twitter/tweetyapi.py +++ b/Twitter/tweetyapi.py @@ -26,7 +26,7 @@ class TweetyApi: except: return None - async def get_tweets(self, user_name, bottom_id, all_posts : list) -> AsyncIterator[Tweet]: + async def get_tweets(self, user_id, bottom_id, all_posts : list) -> AsyncIterator[Tweet]: def validate_tweet(tweet : Tweet): tweet_id_num = int(tweet.id) @@ -46,7 +46,7 @@ class TweetyApi: while user == None: try: - user = await self.app.get_user_info(username=user_name) + user = await self.app.get_user_info(username=user_id) except RateLimitReached as ex: sleep_exponent = await self.sleep_wait(sleep_default, sleep_exponent) except Exception as ex: diff --git a/Twitter/twitterContainer.py b/Twitter/twitterContainer.py index 48428d4..1e741cb 100644 --- a/Twitter/twitterContainer.py +++ b/Twitter/twitterContainer.py @@ -28,7 +28,7 @@ class TwitterContainer(): posts = [] try: - async for tweet in botData.twApi.get_tweets(user_name = self.name, bottom_id = newest_post, all_posts = all_posts): + async for tweet in botData.twApi.get_tweets(user_id = self.id, bottom_id = newest_post, all_posts = all_posts): posts.append(tweet) except (UserProtected, UserNotFound) as ex: diff --git a/getPixivpyToken b/getPixivpyToken index 93544c2..a030675 160000 --- a/getPixivpyToken +++ b/getPixivpyToken @@ -1 +1 @@ -Subproject commit 93544c23c75c462a43555c909640ac9f9c2cf40c +Subproject commit a030675b1f1159d278c371d9f242800de5409809 diff --git a/requirements.txt b/requirements.txt index e60da60..26a9736 100644 Binary files a/requirements.txt and b/requirements.txt differ