def _authenticate(self):
response = requests.post(
'https://www.reddit.com/api/login',
{'user': self._username, 'passwd': self._password},
headers = _FAKE_HEADERS
)
self._cookies = response.cookies
if self._client_id:
self._reddit = praw.Reddit(user_agent=USER_AGENT,
client_id=self._client_id,
client_secret=self._client_secret,
username=self._username,
password=self._password)
评论列表
文章目录