Open Topbcy opened 1 year ago
add -headers "referer: http://jable.tv"
add -headers "referer: http://jable.tv"
still don't understand
main.py modify opener = urllib.request.build_opener() opener.addheaders = [('User-Agent','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'), ('Referer', 'https://jable.tv')] urllib.request.install_opener(opener) urllib.request.urlretrieve(m3u8url, m3u8file)
config.py add 'referer' : 'https://jable.tv'
main.py modify opener = urllib.request.build_opener() opener.addheaders = [('User-Agent','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'), ('Referer', 'https://jable.tv')] urllib.request.install_opener(opener) urllib.request.urlretrieve(m3u8url, m3u8file)
config.py add 'referer' : 'https://jable.tv'
it works.
still dont understand. how make it work ?
please more detail ~~~
Please checkout https://github.com/Calvin-830/JableTVDownload
thank you sir . it work ~~~~
hello sir . i got new issue could you try download belowe video link? https://jable.tv/videos/docp-237/
Traceback (most recent call last):
File "I:\JableTVDownload-allow-multilple-download-from-model-page\main.py", line 39, in
正在下載影片: https://jable.tv/videos/salo-017/ Traceback (most recent call last): File "I:\JableTVDownload-allow-multilple-download-from-model-page\main.py", line 35, in
download(url)
File "I:\JableTVDownload-allow-multilple-download-from-model-page\download.py", line 39, in download
urllib.request.urlretrieve(m3u8url, m3u8file)
File "C:\Users\Bcy\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 241, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
^^^^^^^^^^^^^^^^^^
File "C:\Users\Bcy\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bcy\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 525, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bcy\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 634, in http_response
response = self.parent.error(
^^^^^^^^^^^^^^^^^^
File "C:\Users\Bcy\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 563, in error
return self._call_chain(args)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bcy\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 496, in _call_chain
result = func(args)
^^^^^^^^^^^
File "C:\Users\Bcy\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 643, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
請問有辦法解決嗎~