daniel-widrick / zap2it-GuideScraping

MIT License
61 stars 22 forks source link

Handle channel icon URLs with double slashes #17

Closed micahmo closed 2 years ago

micahmo commented 2 years ago

Hi, I noticed that the URLs for all of the channel icons were coming in with 4 slashes, and my TV front-end was unable to handle the malformed URL to retrieve the icon.

<icon src="http:////zap2it.tmsimg.com/h3/NowShowing/11460/s11039_h3_aa.png"/>

Turns out that the extra leading slashes were coming directly from the zap2it API. I'm not sure why. But any easy fix is to trim any leading slashes before prepending the http://. Seems to work well on my system!

After:

<icon src="http://zap2it.tmsimg.com/h3/NowShowing/11460/s11039_h3_aa.png"/>
daniel-widrick commented 2 years ago

Thank you for this contribution. I have merged your changes.