RedditSharp-DEPRECATED- icon indicating copy to clipboard operation
RedditSharp-DEPRECATED- copied to clipboard

Reddit killed Search that RedditSharp uses

Open Clueless4ever opened this issue 6 years ago • 3 comments

In Things/Subreddit.cs: public Listing<Post> Search(DateTime from, DateTime to, Sorting sortE = Sorting.New, int max = -1) { }

This function will return Error 503 from now on, because reddit killed the search method. See annoucement: https://www.reddit.com/r/changelog/comments/7tus5f/update_to_search_api/

Clueless4ever avatar Apr 17 '18 09:04 Clueless4ever

Hey, I think they reworked their search api and until proper changes are made in reddit sharp, not event he first method will work. The latter two methods will never again work since reddit killed the range search feature. (At least for „common Joe“ devs)


From: Josh Jones [email protected] Sent: Sunday, April 29, 2018 5:10:01 AM To: CrustyJew/RedditSharp Cc: Clueless4ever; Author Subject: Re: [CrustyJew/RedditSharp] Reddit killed Search that RedditSharp uses (#171)

Quick question about this one... are all of the Search() methods broken or just this one with the date ranges in them? I noticed there are three in there:

public Listing<Post> Search(string terms, Sorting sortE = Sorting.Relevance, TimeSorting timeE = TimeSorting.All);

public Listing<Post> Search(DateTime from, DateTime to, Sorting sortE = Sorting.New);

public Listing<Post> Search(DateTimeOffset from, DateTimeOffset to, Sorting sortE = Sorting.New);

I am also not able to get the first one working when trying to get search results from the last week (TimeSorting.Week). Might be user error on my part, but just thought I would check. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/CrustyJew/RedditSharp/issues/171#issuecomment-385226502, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATHdXSmPe777QFmuhnuGR7WxgoPtzzPnks5ttUspgaJpZM4TX7WM.

Clueless4ever avatar Apr 29 '18 11:04 Clueless4ever

Hey thanks for the reply! I actually deleted my comment on the thread in GitHub because the first method is working for me now. My problem was that I was trying to send it a blank search string.

Rock n roll!

On Sun, Apr 29, 2018, 5:15 AM Clueless4ever [email protected] wrote:

Hey, I think they reworked their search api and until proper changes are made in reddit sharp, not event he first method will work. The latter two methods will never again work since reddit killed the range search feature. (At least for „common Joe“ devs)


From: Josh Jones [email protected] Sent: Sunday, April 29, 2018 5:10:01 AM To: CrustyJew/RedditSharp Cc: Clueless4ever; Author Subject: Re: [CrustyJew/RedditSharp] Reddit killed Search that RedditSharp uses (#171)

Quick question about this one... are all of the Search() methods broken or just this one with the date ranges in them? I noticed there are three in there:

public Listing<Post> Search(string terms, Sorting sortE = Sorting.Relevance, TimeSorting timeE = TimeSorting.All);

public Listing<Post> Search(DateTime from, DateTime to, Sorting sortE = Sorting.New);

public Listing<Post> Search(DateTimeOffset from, DateTimeOffset to, Sorting sortE = Sorting.New);

I am also not able to get the first one working when trying to get search results from the last week (TimeSorting.Week). Might be user error on my part, but just thought I would check. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/CrustyJew/RedditSharp/issues/171#issuecomment-385226502>, or mute the thread< https://github.com/notifications/unsubscribe-auth/ATHdXSmPe777QFmuhnuGR7WxgoPtzzPnks5ttUspgaJpZM4TX7WM

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CrustyJew/RedditSharp/issues/171#issuecomment-385243675, or mute the thread https://github.com/notifications/unsubscribe-auth/Ae_KcnyFYWB7c0PpqbhEOl9_1noxWxs-ks5ttaDFgaJpZM4TX7WM .

joshjonesdev avatar Apr 29 '18 15:04 joshjonesdev

is this working for anyone? I cannot get my search to work

     await foreach (var page in subreddit.Search("usa").Take(10).WithCancellation(killMounger.Token))
                {
                    System.Console.WriteLine("AuthorName: {0} -- Karma on Post: {1}", page.AuthorName, page.Score);
                }

jeffward01 avatar May 28 '21 23:05 jeffward01