vorghahn / iptv4plex

IPTV m3u8 Proxy for Plex Live TV & DVR
GNU General Public License v3.0
64 stars 16 forks source link

403 error with some urls #23

Open blairwigley opened 10 months ago

blairwigley commented 10 months ago
if url.startswith('http'):
                        logger.debug("m3u8 url")
                        inputm3u8 = requests.Request(url, headers={'User-Agent':''})    
                        inputm3u8 = requests.urlopen(inputm3u8).read().decode('utf-8')
                        inputm3u8 = inputm3u8.split("\n")[1:]

Not sure if there's any point doing a PR with this because it might break other requests, but I had an issue with a url giving a 403 error. Adding the above with an empty user-agent to line 484 fixed the issue.

Happy to do a PR if that helps, maybe something that tries this if the first try returns a 403.