我在使用 instabot 时遇到问题。我想上传图片但它给了我一个错误
我的代码:
bot = Bot()
bot.login(username=username, password=password)
bot.upload_photo(image,caption='title')
Run Code Online (Sandbox Code Playgroud)
错误:
line 23, in <module> bot.login(username=username, password=password)
line 443, in login if self.api.login(**args) is False
line 240, in login self.load_uuid_and_cookie(load_cookie=use_cookie, load_uuid=use_uuid)
line 199, in load_uuid_and_cookie return load_uuid_and_cookie(self, load_uuid=load_uuid, load_cookie=load_cookie)
line 352, in load_uuid_and_cookie
cookie_username = self.cookie_dict["ds_user"]
KeyError: 'ds_user'
Run Code Online (Sandbox Code Playgroud) 我想获取 Reddit 子版块的热门帖子,但我只能获取所有时间的热门帖子。如何过滤搜索结果以便只查找今天的帖子?
我的代码:
top_memes = subreddit.top(limit=5)
for submission in top_memes:
print(submission.title)
Run Code Online (Sandbox Code Playgroud)