VictorColomb / warplaneporn-lockscreen

Daily background from one or several subreddits for W10/11
MIT License
1 stars 1 forks source link

Requests blocked as of 1 May #6

Open dziban303 opened 5 months ago

dziban303 commented 5 months ago

I was wondering why the lockscreen image hadn't updated in several days. Turns out that Reddit appears to be blocking requests now.

Invoke-WebRequest:

    Blocked

      body {
          font: small verdana, arial, helvetica, sans-serif;
          width: 600px;
          margin: 0 auto;
      }

      h1 {
          height: 40px;
          background: transparent url(//www.redditstatic.com/reddit.com.header.png) no-repeat scroll top right;
      }

    whoa there, pardner!

Your request has been blocked due to a network policy.

Try logging in or creating an account here to get back to browsing.

If you're running a script or application, please register or sign in with your developer credentials here. Additionally make sure your User-Agent is not empty and is something unique and descriptive and try again. if you're supplying an alternate User-Agent string,
try changing back to default as that can sometimes result in a block.

You can read Reddit's Terms of Service here.

if you think that we've incorrectly blocked you or you would like to discuss
easier ways to get the data you want, please file a ticket here.

when contacting us, please include your ip address which is: [redacted] and reddit account

I tried using a different useragent string but it kept blocking requests.

It turns out that changing the URLs used from https://reddit.com to https://old.reddit.com fixed the problem for me. I have a suspicion that this problem was plaguing me alone, but maybe not?

VictorColomb commented 5 months ago

I have a Linux in dual-boot and I quite rarely come back to Windows, so much so that I had not noticed, but it indeed has stopped working on my end too. That blows...

According to this, Reddit seems to now be enforcing mandatory authentication on their APIs. To be honest, I am not going to develop an entire OAuth2 client to make this continue to work. Still, good to hear that old.reddit.com is still working. Hopefully that lasts for a while!

If you would like to take a crack at this, I'll happily archive this repo and include a link to your fork in the README. Let me know!