iptv4plex icon indicating copy to clipboard operation
iptv4plex copied to clipboard

403 error with some urls

Open blairwigley opened this issue 1 year ago • 0 comments

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.

blairwigley avatar Nov 21 '23 09:11 blairwigley