w0d4 / yt-backup

Youtube Backup made easy
GNU General Public License v3.0
46 stars 6 forks source link

Geo-blocked video left in download queue #22

Open sideloading opened 4 years ago

sideloading commented 4 years ago

Describe the bug I have a video thats geo-blocked worldwide, but it is left in the download queue. In the videos DB: download_required=1 Grafana keeps the video in the download queue.

To Reproduce Steps to reproduce the behavior: Video ID in question: https://polsy.org.uk/stuff/ytrestrict.cgi?ytid=wf7I0IYHeos Naming formats: "channel_naming": "%channel_name [%channel_id]" "naming-format": "%(upload_date)s %(title).100s %(height)sp %(id)s.%(ext)s"

Expected behavior Mark video as un-downloadable and remove from queue.

Debug log

2020-05-21 16:33:40,281 - yt-backup - INFO - Video wf7I0IYHeos - Dance Party Ft My Sister (Not ASMR) is not yet downloaded. Downloading now.
2020-05-21 16:33:40,282 - yt-backup - DEBUG - Video belongs to playlist 47
2020-05-21 16:33:40,283 - yt-backup - DEBUG - Video belongs to channel Krystal·Alvarado [UCM1F-Yl9StkHgFo5lmx6qIw]
2020-05-21 16:33:40,290 - yt-backup - DEBUG - Escaped Channel name is Krystal·Alvarado \[UCM1F-Yl9StkHgFo5lmx6qIw\]
2020-05-21 16:33:40,290 - yt-backup - DEBUG - youtube-dl command is: /usr/local/bin/youtube-dl --continue  -4 --download-archive /mnt/shares/yt-backup/archive.list --output /mnt/shares/yt-backup/tmp//"Krystal·Alvarado [UCM1F-Yl9StkHgFo5lmx6qIw]"/"%(upload_date)s %(title).100s %(height)sp %(id)s.%(ext)s" --ignore-config --ignore-errors --merge-output-format mkv  --no-overwrites --format "(bestvideo+bestaudio/best)" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36" --write-info-json --add-metadata --write-thumbnail --prefer-ffmpeg --merge-output-format mkv --no-overwrites --external-downloader aria2c --external-downloader-args '-j 8 -s 8 -x 8 -k 5' https://youtu.be/wf7I0IYHeos
2020-05-21 16:33:42,665 - yt-backup - DEBUG - b'[youtube] wf7I0IYHeos: Downloading webpage\n'
2020-05-21 16:33:42,665 - yt-backup - DEBUG - b'ERROR: wf7I0IYHeos: YouTube said: This video is not available.\nSorry about that.\n'
2020-05-21 16:33:42,665 - yt-backup - DEBUG - youtube-dl stdout: [youtube] wf7I0IYHeos: Downloading webpage

2020-05-21 16:33:42,666 - yt-backup - DEBUG - Current line: [youtube] wf7I0IYHeos: Downloading webpage
2020-05-21 16:33:42,666 - yt-backup - DEBUG - Current line: [youtube] wf7I0IYHeos: Downloading webpage
2020-05-21 16:33:42,666 - yt-backup - DEBUG - Video name is not_downloaded
2020-05-21 16:33:42,676 - yt-backup - INFO - This video is geoblocked in the following countries: CC,CA,CG,CF,CD,CK,CI,CH,CO,CN,CM,CL,CR,CW,CV,CU,VN,CZ,CY,CX,TF,KZ,TD,TC,TN,KR,TL,KP,KW,TK,TH,TV,TW,KI,KH,TR,KN,KM,KG,KE,VU,WF,UG,ZW,UA,LK,LI,UM,DZ,LC,LA,DE,US,LY,LV,DO,LT,DM,DJ,DK,UZ,AI,AM,AL,AO,LB,AE,AD,AG,AF,AX,AZ,YE,AQ,AS,AR,AU,AT,AW,ZM,RW,IE,ID,RS,IM,IL,IO,IN,IQ,RE,IS,IR,IT,RO,BD,BE,BF,BG,BA,BB,TG,BL,BM,BN,BO,BH,KY,BJ,BI,BT,BV,BW,BQ,BR,BS,RU,BY,BZ,SS,SR,LU,SV,ST,UY,SY,SX,JP,LS,SC,SB,SA,JO,SG,SE,TO,SK,JE,SI,SH,SO,SN,SM,SL,GN,GM,GL,GI,GH,GG,GF,GE,GD,GB,GA,GY,GW,GU,GT,GS,GR,GQ,GP,SZ,PY,PR,PS,OM,PW,PT,PK,PH,PN,PL,PM,PA,PF,PG,PE,VG,NI,NU,TZ,TJ,HN,HM,HR,LR,HT,HU,QA,EH,HK,YT,TM,ER,MM,ET,MO,VC,MH,MK,JM,ME,MD,MG,MF,MA,MC,EE,ZA,EG,TT,MY,MX,EC,MZ,MU,MT,MW,MV,MQ,MP,MS,MR,VA,SD,MN,SJ,NR,VE,ML,FR,NL,ES,NO,NA,NC,WS,NE,NF,NG,NZ,VI,NP,FI,FJ,FK,FM,FO,. Current Country: AU
2020-05-21 16:33:42,681 - yt-backup - INFO - This video is geoblocked in the following countries: KN,KM,KH,KI,KG,KE,KZ,KY,KW,KR,KP,CV,CW,CU,CR,CZ,CX,CY,CF,CG,CD,RU,CC,RW,CA,CN,CO,CL,CM,CK,CH,CI,JM,JO,ES,JE,ZW,JP,BQ,BS,BR,BT,BW,BV,BY,BZ,BA,BB,BE,BD,BG,BF,BI,BH,BJ,BM,BL,BO,BN,TW,US,UY,UZ,UG,UA,UM,EE,EG,MX,MY,MZ,EC,MT,MU,MV,MW,MP,MQ,MR,MS,ET,MM,MN,MO,MH,ER,MK,MD,ME,MF,MG,MA,MC,ML,TV,TT,TR,YT,TZ,TG,TF,TD,TC,TO,RE,TM,TL,TK,TJ,TH,DE,PS,LY,DO,LV,DM,LT,DK,DJ,LK,LI,LC,DZ,LA,WS,PM,PL,WF,RO,TN,GB,GA,GF,GG,GD,GE,GH,GI,GN,RS,GL,GM,GR,GS,GP,GQ,GW,GT,GU,ZM,GY,NE,NG,NF,NA,NC,VU,NL,NO,OM,NI,NU,ZA,VN,VI,NP,NR,VE,VG,VA,VC,NZ,FM,FO,FI,FK,FJ,EH,YE,LU,FR,ID,IE,LS,IL,IM,IN,IO,IQ,IR,IS,IT,QA,SI,AI,AL,AM,AO,AD,AE,AF,AG,AX,AZ,LR,AQ,AR,AS,AT,AU,AW,PY,HK,PR,PW,HN,HM,PT,PK,HR,PH,PN,HU,HT,PA,PG,PF,PE,SG,SD,SE,SB,SC,SA,SN,SO,SL,SM,SJ,SK,SH,LB,SV,ST,SR,SS,SZ,SX,SY,. Current Country: AU

Additional context Add any other context about the problem here.

w0d4 commented 4 years ago

Yes, I see this problem also. But I have no idea how to be 100% sure that it's really blocked in all countries. But the videos will be skipped in queue if you are currently in a blocked country.