question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Domain restricted embed video

See original GitHub issue

Hello there, been using the module for a while and it’s awesome so far, but now I hit a wall with the following:

While trying to get a video with explicit content the module does a workaround with an embed url, that’s what I understand so far(please correct me if I’m wrong here) but then that video has a domain restriction so the embed strategy fails.

So I’m doing this(pretty normal)

  1. ytdl.getInfo(url ...: no error here, and I got the video itags info and everything else
  2. ytdl(url ...: [Error: status code 403]

This is the video https://www.youtube.com/watch?v=B3eAMGXFw1o (awful song btw)

I tried some things like using Referer in the headers(like here), but no luck.

As far as I could see the 403 happens in /videoplayback request.

If is there any more info I can provide please say so.

Thanks for your time.

PS: I’m running latest version 0.7.13 and just happens with the video above, I had not tested it with a video with similar configuration. I ran mocha test and all tests passed, just to see if I had some strange network setup

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TimeForANinjacommented, Jan 24, 2017

think i found a fix… at least worked for this one video all i did is i added sts: '17186' to the query params of the get_video_info url in https://github.com/fent/node-ytdl-core/blob/master/lib/info.js#L87 that variable can also be found in the yt.setConfig(Line10 for me) and also in the base.js(Line 6641 for me) hope it also works for u…

should also fix https://github.com/fent/node-ytdl-core/issues/98 https://github.com/fent/node-ytdl-core/issues/83

0reactions
fentcommented, Jan 25, 2017

It does work for me! O_O

Thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I enforce video player embed restrictions? - uStudio
Embed restrictions effectively restrict video content from being loaded outside of the whitelisted web domains, IP addresses, and/or geo locations by ...
Read more >
How to restrict video playback to specific domains
Select a video from your library to open the edit page · Select Settings > Embed Restrictions from the menu · Enter a...
Read more >
Domain Locking Restrictions for Video Playlists
StreamingVideoProvider makes it easy to restrict your playlists so they can only work on allowed domains in just a few steps. Most of...
Read more >
Specify Allowed Domains to Protect Video Embed Codes
Allowed domains enables you to limit where your video embed codes can load and play. It's a straightforward way to prevent someone from ......
Read more >
Allowed Domains - Whitelisting and Restricting Domains for ...
Set a global policy of domain restrictions for your embed codes for all videos.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found