-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sibnet.ru does not download #18182
Comments
I can confirm this with version became:
And without these keys it returns 403 - forbidden. |
Using the headers solves it for me, here bash script: ydl-sib#!/bin/bash
url="$1"
shift
youtube-dl --add-header "Host: video.sibnet.ru" \
--add-header "User-Agent: Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36" \
--add-header "Accept: */*" \
--add-header "Referer: $url" \
--add-header "Range: bytes=0-" "$url" "$@" use it like this: ydl-sib 'https://video.sibnet.ru/rating/video3485877-Kot_i_nevidimaya_pregrada/%D1%8D/' Successfully downloads, outputs:
|
I created some bash script which retrieves direct URL and video title from Sibnet video URL: (codename cusi, from CUrl and SIbnet) cusiUpdated (2019-02-25 14:47:54):
Updated (2019-02-25 17:01:38):
Updated (2019-02-25 17:19:11):
#!/bin/bash
if [[ "$1" == "" ]]; then
echo " cusi By BladeMight, v1.0"
echo "$0 <sibnet-url> <*commands-str>"
echo "In command str you can use variables:"
echo " \\\$du = direct url"
echo " \\\$ti = title"
echo " \\\$id = id"
echo " \\\$au = accept url"
echo "You must escape variables, so they can be processed in code!, Or you can use single quotes ''"
echo "command str examples:"
echo " cusi <url> 'aria2c \"\$du\" -o \"\$ti\"'"
echo " cusi <url> 'ffmpeg -i \"\$du\"'"
exit 0
fi
url="$1"
H1="Accept-Encoding: identity;q=1, *;q=0"
H2="Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6,zh;q=0.5"
H3="User-Agent: Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36"
H4="chrome-proxy: frfr"
H5="Accept: */*"
H6="Connection: keep-alive"
H7="Range: bytes=0-"
H8="Referer: $url"
resp=$(curl -s -H "$H1" -H "$H2" -H "$H3" -H "$H4" -H "$H5" -H "$H6" -H "$H7" --compressed "$url" | iconv -f cp1251 -t utf-8 )
accepturl=$(echo "$resp" | grep -iP '\d+\.mp4' | sed -re 's/.*(\/v\/.*?mp4)", type.*/https:\/\/video.sibnet.ru\1/g')
id=$(echo "$resp" | grep -i DOCTYPE | sed -re 's/.*php\?videoid=([0-9]*).*/\1/g')
echo "Video-Id: $id"
title=$(echo "$resp" | grep -iP 'videoname' | sed -re 's/.*?videoName.>(.*?)<\/h1>.*/\1/g')
echo "Video-Title: $title"
echo "Accept-URL: $accepturl"
directurl=$(curl -I "$accepturl" -s -H "$H1" -H "$H2" -H "$H3" -H "$H4" -H "$H5" -H "$H6" -H "$H7" -H "$H8" --compressed | awk 'BEGIN{IGNORECASE=1} match($0, /location: (.*)/, z) {printf "https:%s", z[1]}')
echo "Direct-URL: $directurl"
if [[ "$2" != "" ]]; then
echo "Eval mode."
au="$accepturl"
du="$directurl"
ti=$(echo "$title" | sed -re 's/\\|\/|\*|:|\"|<|>|\?|\|//g') # safe title
eval $2
fi Use it like this: $ cusi 'https://video.sibnet.ru/rating/video3485877-Kot_i_nevidimaya_pregrada/%D1%8D/'
Video-Id: 3485877
Video-Title: Кот и невидимая преграда
Accept-URL: https://video.sibnet.ru/v/b191e90609fb5399adb254d0b25d84e5/3485877.mp4
Direct-URL: https://dv98.sibnet.ru/32/46/57/3246579.mp4?st=4OqCJPY1IMlq4gxP4VzYrA&e=1551128000&stor=26&noip=1 The trick is to use Android user agent, then in the Sibnet video player there is And you can use it with cusi 'https://video.sibnet.ru/rating/video3485877-Kot_i_nevidimaya_pregrada/%D1%8D/' | awk '/Title:/{ $1=""; TITLE=substr($0, 2, length($0))}/Direct-URL:/{ $1=""; URL=substr($0,2,length($0)) } END { gsub(/\\|\/|\*|:|\"|<|>|\?|\|/, "", TITLE); printf "aria2c \"%s\" -o \"%s.mp4\"", URL, TITLE}' | sh With cusi 'https://video.sibnet.ru/rating/video3485877-Kot_i_nevidimaya_pregrada/%D1%8D/' 'aria2c "$du" -o "$ti"' or even directly to player, e.g. ffplay: cusi 'https://video.sibnet.ru/rating/video3485877-Kot_i_nevidimaya_pregrada/%D1%8D/' 'ffplay -i "$du"' run |
one header what you need is
btw @BladeMight in current cusi you remove 2 first lines and I have error: |
@bato3 Somehow two lines were out in cusi...(i edited the post) Btw, I created repository: BladeMight/cusi, and added some other scripts.
Tests
[generic] shell: Requesting header
WARNING: Falling back on generic information extractor.
[generic] shell: Downloading webpage
[generic] shell: Extracting information
[generic] shell: Downloading MPD manifest
[generic] shell: Downloading m3u8 information
[dashsegments] Total fragments: 9
[download] Destination: Доставщик пиццы спросил разрешения сыграть на фортепиано-shell.fdash-v1-x3.mp4
[download] 100% of 5.21MiB in 00:10
[dashsegments] Total fragments: 9
[download] Destination: Доставщик пиццы спросил разрешения сыграть на фортепиано-shell.fdash-a1-x3.m4a
[download] 100% of 862.29KiB in 00:07
[ffmpeg] Merging formats into "Доставщик пиццы спросил разрешения сыграть на фортепиано-shell.mp4"
Deleting original file Доставщик пиццы спросил разрешения сыграть на фортепиано-shell.fdash-v1-x3.mp4 (pass -k to keep)
Deleting original file Доставщик пиццы спросил разрешения сыграть на фортепиано-shell.fdash-a1-x3.m4a (pass -k to keep)
real 0m27.466s
user 0m0.031s
sys 0m0.015s
About the headers, to get mp4 (not m3u8/mpd) you need the header of UA of Android. |
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like this:[x]
)Make sure you are using the latest version: run
youtube-dl --version
and ensure your version is 2018.11.07. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-v
flag to your command line you run youtube-dl with (youtube-dl -v <your command line>
), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):Video from the site is loaded as php instead of the video itself. This is clearly visible on the penultimate line. I saw that you were previously addressed with this problem, but the question was supposedly closed by a duplicate. The problem still exists, tested on version 2018.11.07
The text was updated successfully, but these errors were encountered: