python - Python ''PRAW'' api 库崩溃脚本
问题描述
我一直在研究一个 python 脚本,旨在帮助使用“警告”来调节 subreddi。但是,我无法让它工作,因为当我到达脚本中它应该使用 api 的位置时,python 窗口就会关闭。我尝试过使用更简单的脚本,但它们都不起作用。这是我更简单的文件(我用它来测试):
import prawcore
import praw
from os.path import isfile
import praw
import pandas as pd
from time import sleep
# Get credentials from DEFAULT instance in praw.ini
reddit = praw.Reddit()
# begining of script
#login
reddit = praw.Reddit(client_id='this is where i put my user agent',
client_secret='this is where i put my secret',
password='this is wher i put my password',
user_agent='PARS (Python-based Advanced Reddit Reprimand System) by u/veryinterestingnut',
username='PicoModBot')
print(reddit.user.me())
这是我的 praw.ini 文件:
# The URL prefix for regular requests.
reddit_url=https://www.reddit.com
# The URL prefix for short URLs.
short_url=https://redd.it
[DEFAULT]
client_id=my id was here
client_secret=this is where i put my pass
user_agent=PARS (Python-based Advanced Reddit Reprimand System) by u/veryinterestingnut
username=PicoModBot
password=my account pass was here
我能做些什么来尝试解决这个问题?任何帮助将非常感激。
解决方案
推荐阅读
- javascript - 从日期输入框中减去 1 天并使用按钮提交
- xcode - 在 XCode for Unity3D 中构建向后兼容的 macOS 包
- python - SVG 填充嵌套元素中的可用空间
- javascript - React 本机自动完成输入列表未正确覆盖输入
- at-command - 如何使用 FILE AT 命令将目录上传到 BG96?
- c++ - 如何为包含具有不同数据类型的向量的函数提供这些不同数据类型的函数?
- sql - SQL Query,有一定条件的两张表
- laravel - 除了另一个表连接之外,雄辩的递归自连接
- javascript - 如何发送参数ajax
- git - 通过 gitHubDesktop 将文件推送到 gitgub 时出错