allejok96 / jw-scripts

Index or download videos and sound recordings from jw.org.
GNU General Public License v3.0
49 stars 10 forks source link

issue with downloading #42

Open darkace1998 opened 1 year ago

darkace1998 commented 1 year ago

Error code:

downloading: William Turner: Wees niet partijdig (Joh. 4:31).mp4 (William Turner: Wees niet partijdig (Joh. 4:31)) Traceback (most recent call last): File "/usr/local/bin/jwb-index", line 33, in sys.exit(load_entry_point('jw-scripts==1.10.1', 'console_scripts', 'jwb-index')()) File "/usr/local/lib/python3.10/site-packages/jw_scripts-1.10.1-py3.10.egg/jwlib/main.py", line 193, in main File "/usr/local/lib/python3.10/site-packages/jw_scripts-1.10.1-py3.10.egg/jwlib/download.py", line 70, in download_all File "/usr/local/lib/python3.10/site-packages/jw_scripts-1.10.1-py3.10.egg/jwlib/download.py", line 165, in download_media File "/usr/local/lib/python3.10/site-packages/jw_scripts-1.10.1-py3.10.egg/jwlib/download.py", line 255, in download_file File "/usr/local/lib/python3.10/urllib/request.py", line 216, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python3.10/urllib/request.py", line 525, in open response = meth(req, response) File "/usr/local/lib/python3.10/urllib/request.py", line 634, in http_response response = self.parent.error( File "/usr/local/lib/python3.10/urllib/request.py", line 563, in error return self._call_chain(args) File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain result = func(args) File "/usr/local/lib/python3.10/urllib/request.py", line 643, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

Command that i run:

jwb-index -d -m filesystem -l O --friendly --limit-rate 5 --checksum --fix-broken /downloads --clean-symlinks

allejok96 commented 1 year ago

Thanks for reporting this. There seems to be an error in the information provided by jw.org for this particular video. Maybe they have done some updates and it haven't had time to fully update everywhere. The jw.org side is not affected by this error because it looks up video links for each video individually (but that takes much longer time to do).

Either way the script should probably not crash when a video is not available, it should just skip it and go for the next one... I'll take that into consideration.