Skip to content
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

Webmock not able disable net connection for shell commands #939

Open
wonderer007 opened this issue May 12, 2021 · 3 comments
Open

Webmock not able disable net connection for shell commands #939

wonderer007 opened this issue May 12, 2021 · 3 comments

Comments

@wonderer007
Copy link

wonderer007 commented May 12, 2021

Using webmock with youtube-dl gem I found out that disable internet connection isn't working. After some debugging, I found that `youtube-dl gem is using the command line library to make an HTTP request. Is there any way I can disable the internet for command-line requests as well?

For example, web mock works well for the below command

Typhoeus.get('https://www.youtube.com/watch?v=OWp6vSHFG4M').body

But for this command it never worked

YoutubeDL::Video.new('https://www.youtube.com/watch?v=OWp6vSHFG4M').information

YoutubeDL internaly using terrapin gem.

@wonderer007 wonderer007 changed the title Webmock disable net connect for shell commands Webmock not able disable net connection for shell commands May 12, 2021
@bblimke
Copy link
Owner

bblimke commented May 12, 2021

@wonderer007 as far as I can see, YoutubeDL is a Python library, not Ruby. WebMock only supports Ruby.

@wonderer007
Copy link
Author

@wonderer007 as far as I can see, YoutubeDL is a Python library, not Ruby. WebMock only supports Ruby.

I am using Ruby wrapper for youtube-dl

@bblimke
Copy link
Owner

bblimke commented Sep 30, 2021

@wonderer007 ok, then the request is made from Python library right? Ruby just invokes Python lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants