Ranchero-Software / NetNewsWire

RSS reader for macOS and iOS.
https://netnewswire.com/
MIT License
8.26k stars 527 forks source link

"Bad URL hash" when consuming RSS feed from Instagram #4002

Open eivindml opened 1 year ago

eivindml commented 1 year ago

This is not stricly a problem with NetNewsWire, but probably in the way Instagram encodes it's image URLs. But it's a problem that NetNewsWire could help solve.

I'm generating an RSS feed from Instagram profiles, using rss.app. But the images won't display in NNW (see image below). The RSS feed encodes Item's like this:

  <item>
      <title><![CDATA[Organize necessary kitchen essentials with our practical, yet elevated hanger section configurations and our extra wide ...]]></title>
      <description><![CDATA[<div><img src="https://instagram.fctt1-1.fna.fbcdn.net/v/t51.2885-15/349110281_798216604854018_7783414642952261956_n.jpg?se=7&stp=dst-jpg_e35&_nc_ht=instagram.fctt1-1.fna.fbcdn.net&_nc_cat=106&_nc_ohc=AwaWTSEctcYAX9JicY2&edm=ACWDqb8BAAAA&ccb=7-5&ig_cache_key=MzExMTA1NzU3MzU5MDY2NDE0MA%3D%3D.2-ccb7-5&oh=00_AfBrtlDn6ZY5CESTpDxuSEvZboUrCaoR7ddCl9hbxg5PBA&oe=6478C085&_nc_sid=640168" style="width: 100%;" /><div>Organize necessary kitchen essentials with our practical, yet elevated hanger section configurations and our extra wide shelf library modules to create space where it is needed. Shop Shelf Library in Warm White Steel at framacph.com.

Visuals by @westtimbercourt

#frama #framacph</div></div>]]></description>
      <link>https://www.instagram.com/p/CsssmFNqQPM</link>
      <guid isPermaLink="false">ded2a2a05f2d417762f67c468c650c52</guid>
      <dc:creator><![CDATA[Instagram]]></dc:creator>
      <pubDate>Fri, 26 May 2023 07:43:04 GMT</pubDate>
      <enclosure url="https://instagram.fctt1-1.fna.fbcdn.net/v/t51.2885-15/349110281_798216604854018_7783414642952261956_n.jpg?se=7&amp;stp=dst-jpg_e35&amp;_nc_ht=instagram.fctt1-1.fna.fbcdn.net&amp;_nc_cat=106&amp;_nc_ohc=AwaWTSEctcYAX9JicY2&amp;edm=ACWDqb8BAAAA&amp;ccb=7-5&amp;ig_cache_key=MzExMTA1NzU3MzU5MDY2NDE0MA%3D%3D.2-ccb7-5&amp;oh=00_AfBrtlDn6ZY5CESTpDxuSEvZboUrCaoR7ddCl9hbxg5PBA&amp;oe=6478C085&amp;_nc_sid=640168" length="0" type="image/jpeg"/>
      <media:content medium="image" url="https://instagram.fctt1-1.fna.fbcdn.net/v/t51.2885-15/349110281_798216604854018_7783414642952261956_n.jpg?se=7&amp;stp=dst-jpg_e35&amp;_nc_ht=instagram.fctt1-1.fna.fbcdn.net&amp;_nc_cat=106&amp;_nc_ohc=AwaWTSEctcYAX9JicY2&amp;edm=ACWDqb8BAAAA&amp;ccb=7-5&amp;ig_cache_key=MzExMTA1NzU3MzU5MDY2NDE0MA%3D%3D.2-ccb7-5&amp;oh=00_AfBrtlDn6ZY5CESTpDxuSEvZboUrCaoR7ddCl9hbxg5PBA&amp;oe=6478C085&amp;_nc_sid=640168" width="1440" height="1800"/>
    </item>

If you copy the image URL and try to open it, it will just show "Bad URL hash".

https://instagram.fctt1-1.fna.fbcdn.net/v/t51.2885-15/349110281_798216604854018_7783414642952261956_n.jpg?se=7&amp;stp=dst-jpg_e35&amp;_nc_ht=instagram.fctt1-1.fna.fbcdn.net&amp;_nc_cat=106&amp;_nc_ohc=AwaWTSEctcYAX9JicY2&amp;edm=ACWDqb8BAAAA&amp;ccb=7-5&amp;ig_cache_key=MzExMTA1NzU3MzU5MDY2NDE0MA%3D%3D.2-ccb7-5&amp;oh=00_AfBrtlDn6ZY5CESTpDxuSEvZboUrCaoR7ddCl9hbxg5PBA&amp;oe=6478C085&amp;_nc_sid=640168

But if the &amp; is replaced with just a &, then the images opens fine.

https://instagram.fctt1-1.fna.fbcdn.net/v/t51.2885-15/349110281_798216604854018_7783414642952261956_n.jpg?se=7&stp=dst-jpg_e35&_nc_ht=instagram.fctt1-1.fna.fbcdn.net&_nc_cat=106&_nc_ohc=AwaWTSEctcYAX9JicY2&edm=ACWDqb8BAAAA&amp;ccb=7-5&ig_cache_key=MzExMTA1NzU3MzU5MDY2NDE0MA%3D%3D.2-ccb7-5&oh=00_AfBrtlDn6ZY5CESTpDxuSEvZboUrCaoR7ddCl9hbxg5PBA&oe=6478C085&_nc_sid=640168

Could NetNewsWire do an extra check to make sure images urls are encoded correctly?

I would really appreciate this, as I'm trying to interact less with Instagram, and to be able to subscribe to some feeds in NNW would really help in this transition.

codelearnco commented 9 months ago

How to change this link?

https://scontent-iad3-1.cdninstagram.com/v/t51.2885-19/345531615_622632949905616_1417603834234220127_n.jpg?stp=dst-jpg_s150x150\u0026_nc_ht=scontent-iad3-1.cdninstagram.com\u0026_nc_cat=104\u0026_nc_ohc=KuvC41Gc0kwAX9XqS8-\u0026edm=AGW0Xe4BAAAA\u0026ccb=7-5\u0026oh=00_AfBpVUydu_FWMBl7UWElmPwjkvsCLFHUpjJvRdH5CB5rFQ\u0026oe=656B3D28\u0026_nc_sid=94fea1

brentsimmons commented 9 months ago

Where are you seeing a Bad URL hash message?

codelearnco commented 9 months ago

Where are you seeing a Bad URL hash message?

When I take the address of the photo from inspect and search

brentsimmons commented 9 months ago

Would you post a screenshot here? That would help me understand where you’re seeing this

Darr247 commented 4 months ago

Here is a screenshot, from Chrome. It's my understanding some browsers DO decode it correctly.

BadURLHash-Instagram