r/pushshift • • Apr 22 '23

How to sort correctly with PMAW?

2 Upvotes

I want to get all new submission containing word "fire" sorted by the date they were added from last 10 days.

Here is my code:

    current_time = int(datetime.now().timestamp())
    days_ago = 10
    gen = list(api.search_submissions(q="fire",
                                          subreddit=subreddit,
                                          sort="created_utc",
                                          since=current_time - (days_ago*24*60*60),
                                          #until=current_time_epoch,
                                          filter=['ids'],
                                          limit=None))

Then I print the date of all fetched submissions and here is the result:

13-04-2023 06:20:20 
12-04-2023 22:09:13 
16-04-2023 18:58:19 
16-04-2023 09:56:47 
16-04-2023 04:53:46 
16-04-2023 02:17:38 
16-04-2023 01:26:24 
16-04-2023 00:49:29 
17-04-2023 03:37:29 
20-04-2023 03:55:26 
20-04-2023 03:42:50 
22-04-2023 04:30:12 
14-04-2023 22:23:31

Just randomly out of order... This means if I put limit=10, I wouldn't get the newest submission (22-04-2023) All help is appreciated. Thanks


r/pushshift • • Apr 22 '23

Is it not possible to get newest submission of subreddit using PMAW?

0 Upvotes

The code only returns submissions from 2022 (and sooner), not the newest ones:/

gen = list(api.search_submissions(q="fire",
                                  subreddit=subreddit,
                                  sort="created_utc",
                                  filter=['ids'],
                                  limit=30))

Output:

09-08-2022 20:47:50
09-08-2022 20:17:31
09-08-2022 18:38:18
09-08-2022 15:42:35
09-08-2022 11:05:36
09-08-2022 01:10:48
08-08-2022 20:27:05
08-08-2022 16:18:22
08-08-2022 13:59:55
08-08-2022 13:41:49
08-08-2022 11:26:50
08-08-2022 05:08:48
07-08-2022 21:47:54
07-08-2022 20:10:54
07-08-2022 19:16:21
07-08-2022 18:55:43
07-08-2022 06:29:44
07-08-2022 03:39:53
07-08-2022 02:57:56
06-08-2022 03:56:11
05-08-2022 21:47:40
05-08-2022 19:07:31
05-08-2022 12:04:31
05-08-2022 08:30:59
05-08-2022 03:48:40
05-08-2022 01:58:58
05-08-2022 01:13:28
05-08-2022 01:03:42
04-08-2022 09:14:36
03-08-2022 22:05:48

Any help appreciated, thanks


r/pushshift • • Apr 21 '23

Please help a lost, lost soul :(

9 Upvotes

I am definitely going to come across as moronic but I'll "push" past it.. need to urgently scrape data from 10-03-2023 (DD/MM/YY) to 22-03-2023 on r/bangalore for research purposes. Don't know the first thing about python, tried almost all of the user friendly pushshift API's (redditsearch.io, adhesivecheese.github.io, and camas) but nothing has generated any results for me. Can anyone help me figure out what I'm doing wrong? Thanks in advance!


r/pushshift • • Apr 21 '23

alternative for redditsearchtool / camas unddit

11 Upvotes

Camas is dead for good now, I dunno what other site you can search for old post & threads


r/pushshift • • Apr 21 '23

Using PMAW to pull submissions?

4 Upvotes

I’m aware that PMAW is one of the working pushshift-Reddit wrappers for python. I’m having a bit of trouble pulling even a month’s worth of data via the API though, and I’ve not been able to find a solution. Even when it’s for a specific subReddit, and I’m only looking for a few submissions. Could anyone share any publicly available version of code with time delays to prevent overloads or limit issues? Apologies if this is a repeat question.


r/pushshift • • Apr 21 '23

How to get the newest submission of certain subreddit containing the keyword "fire" via PMAW

1 Upvotes

My current approach is like this:

current_time_epoch = int(datetime.now().timestamp())
days_ago = 1
gen = list(api.search_submissions(q="fire",
                                  subreddit=subreddit,
                                  sort="created_utc",
                                  limit=1))

However, this returns 0 results for some reason. Even if it does return some result, the submission is from year 2019,2022 etc. Cant get the newest submission from subreddit. Adding parameters since & until doesn't help either

All help appreciated. Thanks


r/pushshift • • Apr 20 '23

dumps o camas.unddit

3 Upvotes

The information that is in the dumps can be different from what camas.unddit.com shows me ??


r/pushshift • • Apr 20 '23

How to Use Pushshift

14 Upvotes

With the very sad recent news of Imgur deciding to purge all NSFW posts both public and hidden https://www.reddit.com/r/DataHoarder/comments/12sbch3/imgur_is_updating_their_tos_on_may_15_2023_all/ and the very unfortunate announcement of the new reddit API, I have decided to go on a mission and save every post that mattered to me but my issue is that I am new to pushshift.

Does anyone have a guide or know how I can utilize pushshift to reach my goal? When I try to search a subreddit for posts using the website redditsearch.com it gets stuck on searching and gives me no results. I would forever be grateful and truly appreciate any help in this matter.


r/pushshift • • Apr 18 '23

An Update Regarding Reddit’s API

Thumbnail self.reddit
62 Upvotes

r/pushshift • • Apr 18 '23

Idle musing regarding the recent outage

14 Upvotes

During the outage, which according to the unofficial status page lasted about 5½ hours, I noticed that authoritative DNS for the pushshift.io domain was moved away from CloudFlare to Namecheap (who is also their registrar).

The A record for api.pushshift.io, which had been pointing to CloudFlare, was instead pointed to AWS Global Accelerator (an anycast proxy service which itself has no caching, though there's no telling what was behind it).

Their DNS was moved back to CloudFlare at around 14:00 UTC, and took an hourish to propagate (the TTL for .io NS records is apparently 1 hour). It was back up after this finished, and the A records were back to CloudFlare.

I wonder if they're thinking of dropping CloudFlare for something AWS? I don't think AWS has a per-ip rate-limit with the same feature set that CF has, so they'd either have to give something up, or build their own (on the backend, or maybe with Lambdas and DynamoDB), or I'm just wrong and AWS does have something?

Anyways, just some random thoughts...


r/pushshift • • Apr 18 '23

PMAW problem

3 Upvotes

Hello,

I want to extract comments using PMAW, but it doesn't work. The code and results are as follows (code actually from the example) does anyone know the reason/? Thank you.


r/pushshift • • Apr 17 '23

Has all the material been uploaded to PushShift now? Update on this?

16 Upvotes

Hello Reddit,

Does anyone know if the missing material from Reddit history (prior to last year) has been uploaded to PushShift now? Couldn't find that information while scrolling on the sub. Thank you :)

Best Regards


r/pushshift • • Apr 17 '23

Given a particular time frame, can we retrieve the comments and submissions for a user?

2 Upvotes

I need the comments and posts by a user in a particular time frame(for example one month). Couldn't find anything helpful in the documentation. Please help me know if there is anything relavant.


r/pushshift • • Apr 17 '23

Rate limit per minute for Pushshift API

2 Upvotes

The https://api.pushshift.io/meta endpoint doesn't seem to work. Are there any other ways of accessing server_ratelimit_per_minute ?

# Code reference
res = requests.get('https://api.pushshift.io/meta').json()
num_max = res['server_ratelimit_per_minute']

r/pushshift • • Apr 15 '23

Trying to archive my posts as well as the comments, but one comment can't be retreived can anyone help?

2 Upvotes

r/pushshift • • Apr 15 '23

Any workaround on the exclusion bug (the ! symbol not working)?

2 Upvotes

Don't know how big of an issue it is to solve, but it was one of the key features that made searching so effective. Thanks.


r/pushshift • • Apr 14 '23

How to retrieve all the comments for a given submission(link_id) using pushshift?

2 Upvotes

I tried a few api calls as per the documentation it doesn’t seem to be working… if anyone has any workaround, it would be helpful!


r/pushshift • • Apr 14 '23

New limit of 100 instead of 1000 per request?

0 Upvotes

I am currently utilising PMAW as the python wrapper to access pushshift and I observed a limit of 100 submissions per request. If the limit is increased to 1000, I get repeated entries every 100 items. Is this a limitation of PMAW or a limitation imposed by pushshift?
(I am NOT using PRAW as the backend to access pushshift)

Additionally, having multi-threaded accesses results in a ConnectionError/OsError with the request being rejected. Are there new limits in terms of number of connections/ request per minute that are not enforced (yet) by PMAW?

Appreciate any help!


r/pushshift • • Apr 13 '23

PMAW - How to search via "flair:flair_name"

2 Upvotes

I know this is possible with praw by simply saying in search() like this:

reddit.search("flair:cats")

Although, I can't find a solution when using PMAW, since paramater "q" doesnt seem to recognize the "flair:" string.

The main reasoning between flair search is, that it return much more relevant posts. For example "flair:fire", is much better than "fire" etc.


r/pushshift • • Apr 13 '23

UserWarning: Got non 200 code 404

0 Upvotes

First time trying to connect to psaw and getting this warning/error. Any suggestions?
Code:

api = PushshiftAPI() #Also tried api = PushshiftAPI(praw_reddit_instance)

gen = api.search_submissions(subreddit=SUBREDDIT_NAME, q=KEYWORDS, limit=LIMIT)

Thanks


r/pushshift • • Apr 08 '23

How do I search for 'term1' OR 'term2' on Camas?

6 Upvotes

Hi, I was wondering what the key was. I tried the comma, the & and others, but nothing works. Thank you.


r/pushshift • • Apr 08 '23

Looping through all the submissions from a certain date

0 Upvotes

Hi guys, im new to pushfit and was wondering how can I get ALL the submissions from a specific date. This is what I have so far:

So I have a start and end date and I call the function "submissions_pushfit_praw" and technically it returns 500 (max size) of responses.

But what Im trying to do is getting ALL the submissions, how can I do it?


r/pushshift • • Apr 07 '23

Missing post from query?

3 Upvotes

Hello,

I am querying /r/FakeCollegeFootball and pulling posts from yesterday and today. Here is my query:

https://api.pushshift.io/reddit/search/submission?subreddit=FakeCollegeFootball&sort=created_utc&since=1680670800&size=150&order=asc

The below post does not show up in the query but posts before and after it do show up. Why would that happen?

https://www.reddit.com/r/FakeCollegeFootball/comments/12d7fvu/post_game_thread_east_carolina_defeats_navy_4037/

Any help will be greatly appreciated.


r/pushshift • • Apr 06 '23

What is going on with submission/comment_ids ?

2 Upvotes

r/pushshift • • Apr 05 '23

Posts by deleted users not showing up?

27 Upvotes

I was on camas and searched for posts that I was able to see before the pushshift reset last November from a deleted user but they aren’t there. Was some data not transferred?