Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[video.fc2.com] ERROR: Unable to extract OpenGraph title #22092
Comments
|
I looked into this a bit more and it seems that FC2 has made how they serve up their videos slightly more complex. What I observed is that, once you hit the play button, a GET request is made to
which returns structured data of this form: {
"type": 1,
"playlist": {
"nq": "/api/v3/videoplay/{some_id}/2?signature={some_signature}&t={some_t}"
},
"playstatus": "/api/v3/videoplaystatus/{some_id}?signature={some_signature}",
"playtime": "https://api.video.fc2.com/api/v3/videoplaytime/{some_id}?signature={some_signature}",
"service": null,
"session": {
"id": "{some_id}",
"nq": "{some_nq}"
}
}
From there, another GET request is made using the above information plus a bit extra:
The referrer can be left blank, and I suppose The response to this GET request will be
where Actual example using the above video:curl -X GET 'https://video.fc2.com/api/v3/videoplaylist/200911145aCpHnxm?sh=1&fs=0'Response: {
"type": 1,
"playlist": {
"nq": "/api/v3/videoplay/vSgvvlKll9HTHlSTozRTRWz9a9P9vvSPgQ8AnxFk/2?signature=3N6FQ63WQNVWSI40KTY3LCH.T_N8VITMVNR$HIVXWDGBM-2WRN&t=1565818254"
},
"playstatus": "/api/v3/videoplaystatus/vSgvvlKll9HTHlSTozRTRWz9a9P9vvSPgQ8AnxFk?signature=3N6FQ63WQNVWSI40KTY3LCH.T_N8VITMVNR$HIVXWDGBM-2WRN",
"playtime": "https://api.video.fc2.com/api/v3/videoplaytime/vSgvvlKll9HTHlSTozRTRWz9a9P9vvSPgQ8AnxFk?signature=3N6FQ63WQNVWSI40KTY3LCH.T_N8VITMVNR$HIVXWDGBM-2WRN",
"service": null,
"session": {
"id": "vSgvvlKll9HTHlSTozRTRWz9a9P9vvSPgQ8AnxFk",
"nq": "UyGI4D"
}
}curl -sIX GET 'https://video.fc2.com/api/v3/videoplay/BAA101_Z10LwLADmLiqAfsw_aZ1YAZi1DUxb1cIo/2?signature=1KT8JR-4IA01_4255.PVC8BYNMRQSI5GS&t=1565818706&eTVaF8=0&pf=Win32&lg=en-US&referrer='Response Headers:
Judging by those |
|
Thank you a lot for detailed explanation :) |
|
This may help some people: videoId=<<PUT THE VIDEO URL HERE>>
params=($(curl -X GET "https://video.fc2.com/api/v3/videoplaylist/${videoUrl}?sh=1&fs=0" | jq --raw-output '.playlist.nq,.session.nq'))
youtube-dl "https://video.fc2.com${params[1]}&${params[2]}=0&pf=Win32&lg=en-US&referer=" Copy this full example in your terminal to test this:videoUrl=200911145aCpHnxm
params=($(curl -X GET "https://video.fc2.com/api/v3/videoplaylist/${videoUrl}?sh=1&fs=0" | jq --raw-output '.playlist.nq,.session.nq'))
youtube-dl "https://video.fc2.com${params[1]}&${params[2]}=0&pf=Win32&lg=en-US&referer=" The Also grab |
|
Thanks, this worked like a charm! The only thing I had to change to get it to work on my machine was changing the indices of Also note that in your first code block, you set a variable called |
Checklist
Verbose log
OS : Ubuntu 18.04
Python --version : Python 2.7.15+
Internet : [ OK√ ]
Test URL: https://video.fc2.com/content/200911145aCpHnxm
Description
Last week I was able to download the video on video.fc2.com. But today it seem like doesn't work (anymore), giving me the OpenGraph-Error.
Thanks for reading my issue!