iptv4plex
iptv4plex copied to clipboard
403 error with some urls
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.