Embed icon indicating copy to clipboard operation
Embed copied to clipboard

Not working on certain website

Open vtibo opened this issue 6 years ago • 1 comments

Hello, I love this tool, unfortunately it's not working for exemple on this web site : https://www.udemy.com/

I read somewhere that : The fix is to add the user-agent in the request headers.

Hope it can help

Cheers

vtibo avatar Jul 09 '19 16:07 vtibo

Hi @vtibo

Change the following line of code in your /Embed/demo/index.php file:

CHANGE $dispatcher = new Embed\Http\CurlDispatcher(); to $dispatcher = new Embed\Http\CurlDispatcher([ CURLOPT_USERAGENT => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22', ]);

And you're done! You can see working example for that https://www.udemy.com/ site here

Hope it helps - Cheers

bullride avatar Oct 11 '19 21:10 bullride