j***@astraweb.com
2024-05-21 14:10:04 UTC
Has anyone had any luck with the yt-dlp argument --xff ?
I have tried every permutation i could think of testing with a country code of bg and then ru .
so, what is the exact syntax that works for you?
Does it have to used in conjunction with another argument?
~~~~~
Geo-restriction:
--geo-verification-proxy URL Use this proxy to verify the IP address for
some geo-restricted sites. The default proxy
specified by --proxy (or none, if the option
is not present) is used for the actual
downloading
--xff VALUE How to fake X-Forwarded-For HTTP header to
try bypassing geographic restriction. One of
"default" (only when known to be useful),
"never", an IP block in CIDR notation, or a
two-letter ISO 3166-2 country code
~~~~~~~
(yt is a batch file that executes %YT% which is .exe yt-dlp with some boiler plate arguments which was
set in the child environment by another .bat)
here is a sample of tries that did not work:
~~~~~~~
c:\youtube-dl_ 9:30:18.17_>yt --xff bg "https://ok.ru/video/4062987880968"
c:\youtube-dl_ 9:30:27.14_>yt-dlp --socket-timeout 3600 -i --sub-langs "en." --xff bg
"https://ok.ru/video/4062987880968
"
[Odnoklassniki] Extracting URL: https://ok.ru/video/4062987880968
[Odnoklassniki] 4062987880968: Downloading desktop webpage
[Odnoklassniki] 4062987880968: Downloading mobile webpage
ERROR: [Odnoklassniki] 4062987880968: This video is not available in your region
c:\youtube-dl_ 9:30:32.11_>yt --xff ru "https://ok.ru/video/4062987880968"
c:\youtube-dl_ 9:30:47.81_>yt-dlp --socket-timeout 3600 -i --sub-langs "en." --xff ru
"https://ok.ru/video/4062987880968
"
[Odnoklassniki] Extracting URL: https://ok.ru/video/4062987880968
[Odnoklassniki] 4062987880968: Downloading desktop webpage
[Odnoklassniki] 4062987880968: Downloading mobile webpage
ERROR: [Odnoklassniki] 4062987880968: This video is not available in your region
c:\youtube-dl_ 9:30:51.70_>yt --xff 'ru' "https://ok.ru/video/4062987880968"
c:\youtube-dl_ 9:31:11.27_>yt-dlp --socket-timeout 3600 -i --sub-langs "en." --xff 'ru'
"https://ok.ru/video/40629878809
68"
Usage: yt-dlp [OPTIONS] URL [URL...]
yt-dlp: error: Unsupported --xff "'ru'"
c:\youtube-dl_ 9:31:13.62_>yt --xff .ru "https://ok.ru/video/4062987880968"
c:\youtube-dl_ 9:38:58.64_>yt-dlp --socket-timeout 3600 -i --sub-langs "en." --xff .ru
"https://ok.ru/video/406298788096
8"
Usage: yt-dlp [OPTIONS] URL [URL...]
yt-dlp: error: Unsupported --xff ".ru"
c:\youtube-dl_ 9:39:00.65_>
~~~~~~
I have tried every permutation i could think of testing with a country code of bg and then ru .
so, what is the exact syntax that works for you?
Does it have to used in conjunction with another argument?
~~~~~
Geo-restriction:
--geo-verification-proxy URL Use this proxy to verify the IP address for
some geo-restricted sites. The default proxy
specified by --proxy (or none, if the option
is not present) is used for the actual
downloading
--xff VALUE How to fake X-Forwarded-For HTTP header to
try bypassing geographic restriction. One of
"default" (only when known to be useful),
"never", an IP block in CIDR notation, or a
two-letter ISO 3166-2 country code
~~~~~~~
(yt is a batch file that executes %YT% which is .exe yt-dlp with some boiler plate arguments which was
set in the child environment by another .bat)
here is a sample of tries that did not work:
~~~~~~~
c:\youtube-dl_ 9:30:18.17_>yt --xff bg "https://ok.ru/video/4062987880968"
c:\youtube-dl_ 9:30:27.14_>yt-dlp --socket-timeout 3600 -i --sub-langs "en." --xff bg
"https://ok.ru/video/4062987880968
"
[Odnoklassniki] Extracting URL: https://ok.ru/video/4062987880968
[Odnoklassniki] 4062987880968: Downloading desktop webpage
[Odnoklassniki] 4062987880968: Downloading mobile webpage
ERROR: [Odnoklassniki] 4062987880968: This video is not available in your region
c:\youtube-dl_ 9:30:32.11_>yt --xff ru "https://ok.ru/video/4062987880968"
c:\youtube-dl_ 9:30:47.81_>yt-dlp --socket-timeout 3600 -i --sub-langs "en." --xff ru
"https://ok.ru/video/4062987880968
"
[Odnoklassniki] Extracting URL: https://ok.ru/video/4062987880968
[Odnoklassniki] 4062987880968: Downloading desktop webpage
[Odnoklassniki] 4062987880968: Downloading mobile webpage
ERROR: [Odnoklassniki] 4062987880968: This video is not available in your region
c:\youtube-dl_ 9:30:51.70_>yt --xff 'ru' "https://ok.ru/video/4062987880968"
c:\youtube-dl_ 9:31:11.27_>yt-dlp --socket-timeout 3600 -i --sub-langs "en." --xff 'ru'
"https://ok.ru/video/40629878809
68"
Usage: yt-dlp [OPTIONS] URL [URL...]
yt-dlp: error: Unsupported --xff "'ru'"
c:\youtube-dl_ 9:31:13.62_>yt --xff .ru "https://ok.ru/video/4062987880968"
c:\youtube-dl_ 9:38:58.64_>yt-dlp --socket-timeout 3600 -i --sub-langs "en." --xff .ru
"https://ok.ru/video/406298788096
8"
Usage: yt-dlp [OPTIONS] URL [URL...]
yt-dlp: error: Unsupported --xff ".ru"
c:\youtube-dl_ 9:39:00.65_>
~~~~~~