Questions tagged [praw]

PRAW (Python Reddit API Wrapper) is a python package used to access and interact with the reddit API.

PRAW, short for Python Reddit API Wrapper, is a python package that allows for simple access to ’s API. PRAW aims to be as easy to use as possible and is designed to follow all of reddit’s API rules. You have to give a useragent that follows the rules, everything else is handled by PRAW so you needn’t worry about violating them.

617 questions
3
votes
1 answer

How can I download videos from reddit using praw

So I want to download videos from reddit, I've seen projects on github but I'm very new to python and don't know how it works, if someone could explain I'd appreciate it, I found this project It works but it seperates audio and video and I want it…
rabbibillclinton
  • 410
  • 4
  • 17
3
votes
3 answers

How to scrape a list of saved reddit posts to a txt file using praw in Python

I'm attempting a simple scraper to dump my saved Reddit posts to a txt file and struggling to get the script to do what I want it to do. Here's some context. The script below dumps all of my saved post IDs into a text file, each one in its own…
gaxar
  • 35
  • 8
3
votes
1 answer

Search every subreddit by keyword with Praw

I'm having trouble understanding if this is possible in the praw API: I'd like to get a list of all posts that have comments mentioning a keyword, say "python". It seems like the search function is always called form a specific subreddit, as in for…
theQman
  • 1,690
  • 6
  • 29
  • 52
3
votes
1 answer

TypeError: cannot concatenate 'str' and 'Redditor' objects

Traceback (most recent call last): File "run.py", line 56, in run(r, comments_replied_to) File "run.py", line 30, in run_bot b.write("Author=" + comment.submission.author + "\n") TypeError: cannot concatenate 'str' and…
Dann
  • 159
  • 6
3
votes
1 answer

How to use bs4 to craw multiple page at the same time?

I want to collect the comment on reddit an I use praw to get an ID of a document like a2rp5i . For example, I already collect a set of ID like docArr= ['a14bfr', '9zlro3', 'a2pz6f', 'a2n60r', 'a0dlj3'] my_url =…
wayne64001
  • 399
  • 1
  • 3
  • 13
3
votes
2 answers

Reddit PRAW API: Extracting entire JSON format

I am working on Sentiment Analysis using The Reddit API Praw. My code is below: #!/usr/bin/env python # -*- coding: utf-8 -*- import praw from IPython import display from nltk.sentiment.vader import SentimentIntensityAnalyzer as SIA from pprint…
La_haine
  • 339
  • 1
  • 6
  • 18
3
votes
1 answer

Reddit Python Bot, why is it unsafe to store login credentials in the script?

I'm following along this tutorial: http://pythonforengineers.com/build-a-reddit-bot-part-1/ and in the Create Reddit App subsection it states that I should not have any login credentials directly in the script, because 'others might see them'. Now,…
3
votes
1 answer

PRAW - 500 HTTP Response error

So, I'm hosting a discord.py bot on Heroku, and I'm trying to use PRAW to take a random submission from the hot section of the subreddit. if message.content.startswith("~reddit"): subreddit = reddit.subreddit("VaporwaveAesthetics") await…
3
votes
2 answers

Can you stream posts that have made it to "hot"?

So let's say that I want to stream posts from the subreddit "news". However the posts are very frequent and we can't say that every post is worthy. So I would like to filter the good posts by trying to stream the "hot" list. But I am not sure if…
Huzo
  • 1,652
  • 1
  • 21
  • 52
3
votes
1 answer

Get all submissions from a subreddit without 'submissions'

Is there any way to get all submissions from a subreddit without using the function submissions() from PRAW? With submissions i was able to search all submission from a given subreddit between two timestamps. But now the Reddit API was updated and…
Torb
  • 259
  • 2
  • 12
3
votes
1 answer

How can I get all submission id's from a subreddit?

I'm trying to write a chat bot and I want to feed it data from specific subreddits, e.g. https://www.reddit.com/r/leagueoflegends/ I'm already able to crawl all comments while recursively looping reddit = praw.Reddit() submission =…
hi im vinzent
  • 163
  • 2
  • 15
3
votes
1 answer

I am having multiple SSL error's with different python applications

First, I cannot pip install pretty much anything without adding in --trusted-host pypi.python.org. If I do not include it, i get an error reading Could not fetch URL https://pypi.python.org/simple/beautifulsoup/: There was a problem confirming the…
ThePeskyWabbit
  • 417
  • 1
  • 7
  • 23
3
votes
1 answer

Error: PYTHON DJANGO PRAW REDDIT-API

building locally a Django 1.8 web app in a Python 2.7 virtual env using Praw 4.4.0. The project is called demonstration and has an app called app Atm, This is part of the result when going to: http://127.0.0.1:8000/app/profile/ app/views.py has…
Tiago Martins Peres
  • 14,289
  • 18
  • 86
  • 145
3
votes
1 answer

PRAW 4: 400 ERROR when trying to download a users comments

I'm trying to create a Reddit bot that when a username is mentioned it gets the users comments and sends it to an API to analyze them and return a request but when I try to download them it gives me prawcore.exceptions.BadRequest: received 400 HTTP…
MatejMecka
  • 1,448
  • 2
  • 24
  • 37
3
votes
0 answers

Failing to run Python script from R because of module ImportErrors

I am trying to call a python script from an R Shiny app. I have tried using the system() function, which enters into the file properly but immediately fails after attempting to import any modules. system('python /path/to/name_of_file.py') Traceback…
eleh915
  • 65
  • 1
  • 6
1 2
3
41 42