-3

I am trying to access a webpage that asks for microphone (like this one), how do I deny it using python? The library that I am using is requests, but I can use another one.

Thanks

petezurich
  • 9,280
  • 9
  • 43
  • 57
ksa0ths
  • 1
  • 2

2 Answers2

3

These kind of APIs (location, microphone, camera, etc) are using JavaScript, so basically only have effect if you are using a browser (or something very-very similar to a browser).

On the other hand, libraries like requests operates on HTTP and have nothing to do with JavaScript APIs. Basically you do not have to do anything, because the JavaScript from the site will not run, so there is nothing to allow or deny.

  • Thanks, so could be it possible to use the selenium library as the other answer told? – ksa0ths Feb 08 '20 at 16:48
  • If you would like to *forcibly deny* it, then yes, that is possible through Selenium. If you are only interested not allowing it (e.g. the website cannot access your mic while you are scraping it), then you are good to go with what you have now. – Hollay-Horváth Zsombor Feb 08 '20 at 16:54
-1

Is this what you want? ← (bascially, you just need to use Selenium and his ChromeOptions Class