0

I have a simple IWebBrowser2 browser in my application like this one sample.

We use this browser control for a research in our application to search for address information. The user may click on a button to perform a selective search for given keywords in the address and the result is shown in this browser control.

For example we execute a YouTube search for

https://www.youtube.com/results?search_query=test+video

I can copy the link into a browser (Chrome, IE, Edge) and the search is executed.

But from within the embedded Control the search shows the following text:

Google Sorry...
We're sorry... ... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now. See Google Help for more information.

The help links are not useful, and the problem arises only to searches on Youtube from within the IWebBrowser2. No Captcha is shown. We use AV and Firewall software... so something from YouTube/Google don't like browsing from an IWebBrowser2.

Hint: If you want to use the sample code form CodeProject you should thet ES_AUTOHSCROLL for the URL edit control. Otherwise you will not be able to enter a long search URL.

xMRi
  • 14,982
  • 3
  • 26
  • 59
  • I doubt it is related but when I added a YouTube plugin to my WordPress website I had to setup a YouTube API and set all the credentials so that no one would abuse the system. Just thought I mention it but probably barking up the wrong tree. – Andrew Truckle Aug 08 '18 at 08:54
  • Hmmm. I am not using any API function... also I suppose that it isn't allowed to create an YouTube API key and to publish it with my software, But I maybe wrong... have to investigate this. – xMRi Aug 08 '18 at 08:59

1 Answers1

0

Set the agent field of the http query header to emulate a known browser.

guest
  • 1
  • 1
    Welcome to Stackoverflow! While you post might answer the question, it would be even more helpful if you could provide a concrete example on how this is done. – Adrian W Aug 08 '18 at 19:27