praw

How to scrape posts from a subreddit from a specific year?

How to scrape posts from a subreddit from a specific year? Question: I’m trying to retrieve all the posts from a subreddit that were created in 2020. Below is the code I wrote to try to solve this import praw import pandas as pd import datetime subreddit = reddit_read_only.subreddit("SuicideWatch") # Scraping the top posts of …

Total answers: 1

How to scrape all the posts from a subreddit from a specific period of time?

How to scrape all the posts from a subreddit from a specific period of time? Question: I’m trying to retrieve all the posts from a subreddit that were created in 2020-2021. Below is the code I wrote to try to solve this import datetime subreddit = reddit_read_only.subreddit("SuicideWatch") # Scraping the top posts of all time …

Total answers: 2

How to get total number of posts of a subreddit using Python?

How to get total number of posts of a subreddit using Python? Question: I am working on a project where I have to scrap subreddit using PRAW. But I have to put limit so that it will scrap only that many posts. For example, if I want to scrap a subreddit gaming (https://www.reddit.com/r/gaming/) I have …

Total answers: 2

How can i get the normal Url from reddit using python praw

How can i get the normal Url from reddit using python praw Question: My problem is that reddit gives my a a coded url instead of the normal one. The problem I am trying to solve is that i need to get the normal url from the certain reddit post, not the one my code …

Total answers: 1

How to get latest post i made in a specific subreddit using Python PRAW

How to get latest post i made in a specific subreddit using Python PRAW Question: I need to check the information about the last post i made on specific subreddit using PRAW. I’m still new to Python and PRAW in general so I did my research and unfortunately I only ended up with getting the …

Total answers: 1

Reddit API not giving the correct number of search results

Reddit API not giving the correct number of search results Question: I’m trying to search for subreddits associated with a keyword by using the Reddit API but I’m having trouble trying to get 50 or more results. I’ve used the API with the requests library and now with praw and both had the same issue. …

Total answers: 1

Unclosed client session

Unclosed client session Question: I’m trying to make command to discord bot ,that takes list from this script and send one random from them.I started program in Python about month ago soo it’s actually pretty hard for me. Problem is that when i run this script appears error : Unclosed client session client_session: <aiohttp.client.ClientSession object …

Total answers: 1

PRAW mentions not displaying when looping thru them

PRAW mentions not displaying when looping thru them Question: I am trying to make a bot, that will reply when mentioned with PRAW API. import praw import time print("Bot running..") //login info def replyFunc(): print(reddit.inbox.mentions(limit=None)) for mention in reddit.inbox.mentions(limit=None): print(f"{mention.author}n{mention.body}n") mention.reply("**test**") mention.read() while True: replyFunc() print("Loop") time.sleep(2) No errors printed and nothing is and print(f"{mention.author}n{mention.body}n") …

Total answers: 2

Praw: How to get top posts that were created in last 24 hours?

Praw: How to get top posts that were created in last 24 hours? Question: I want to get top posts of a subreddit but I only get top posts of all time. How to filter the search results so it only looks for today posts? My code: top_memes = subreddit.top(limit=5) for submission in top_memes: print(submission.title) …

Total answers: 2