The Pebble Reddit feed has stopped working

  • 1
  • Problem
  • Updated 3 years ago
The Pebble Reddit feed has stopped working in Newsblur this week. The sub is still active, my other reddit feeds work fine. 

https://www.reddit.com/r/pebble/.rss

Any idea what's wrong?
Photo of Allen D

Allen D

  • 41 Posts
  • 2 Reply Likes
  • confused

Posted 3 years ago

  • 1
Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6514 Posts
  • 1474 Reply Likes
Photo of Allen D

Allen D

  • 41 Posts
  • 2 Reply Likes
https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fkindle%2F.rss doesn't validate either, but it still works just fine and dandy in NewsBlur. None of their feeds validate, but Pebble is the only one Newsblur is choking on. 
Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6514 Posts
  • 1474 Reply Likes
Welp, it looks like they are banning the NewsBlur User-Agent.

>>> import requests
>>> headers = {'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/atom+xml, application/rss+xml, application/xml;q=0.8, text/xml;q=0.6, */*;q=0.2', 'User-Agent': u'NewsBlur Feed Fetcher - 1 subscriber - http://nb.local.com/site/799/pebble-an-e-paper-watch-for-iphone-and-android (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3)'}
>>> requests.get('https://www.reddit.com/r/pebble/.rss', headers=headers)
<Response [404]>
>>> del headers['User-Agent']
>>> requests.get(f.feed_address, headers=headers)
<Response [200]>
Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6514 Posts
  • 1474 Reply Likes
I have no idea what's going on.

>>> headers['User-Agent'] = 'Feed Fetcher - 1 subscriber - nb.local.com/site/799/pebble-an-e-paper-watch-for-iphone'

>>> requests.get('https://www.reddit.com/r/pebble/.rss', headers=headers)

<Response [404]>

>>> headers['User-Agent'] = 'Feed Fetcher - 1 subscriber - nb.local.com/site/799/pebble-an-e-paper-watch-for'

>>> requests.get('https://www.reddit.com/r/pebble/.rss', headers=headers)

<Response [200]>

Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6514 Posts
  • 1474 Reply Likes
Ok, I wrote up a test case and submitted it to Reddit. Looks like they are blocking the word 'iPhone' in the User-Agent, which NewsBlur passes to the feed because it's in the title of the feed.

https://www.reddit.com/r/bugs/comments/5iqz4r/reddit_rss_feed_404s_when_the_useragent_has/
Photo of Allen D

Allen D

  • 41 Posts
  • 2 Reply Likes
Weird... thank you for looking into this so thoroughly, Samuel.