News Filter Not Working. What is the new alternative??? - page 10

 
Vitaly Muzichenko #:

Yeah , navigate to that url in the referer beforehand i mean

 
Lorentzos Roussos # :

Yeah , navigate to that url in the referer beforehand i mean

I did everything, the code works on mt5 without problems on the computer and on VPS

For mt4 this code works on VPS, but does not work on a computer, I get error 403. When repeating requests every 5 minutes = the Investing server gives me news.

How to solve the problem to receive news on the first try?

 
 

Hello,

Last 2 days news filter also does not work correctly at my side. Error 403. 

Sometimes rarely investing.com  gives news data, but mostly answer is 403 "Just a minute.."  

I am trying different refers in WebRequest

 

//  res=WebRequest("GET","https://sslecal2.investing.com",cookie,"Referer: https://www.investing.com/economic-calendar/\r\nUser-Agent: Safari/17.5 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1\r\n",timeout,post,0,result,headers);

//   res=WebRequest("GET","https://sslecal2.investing.com",cookie,"Referer: https://www.investing.com/economic-calendar/\r\nUser-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1\r\n",timeout,post,0,result,headers);

//res=WebRequest("GET","https://sslecal2.investing.com",cookie,"Referer: https://www.investing.com/economic-calendar/\r\nUser-Agent: Mozilla/5.0 (Linux; U; Android 8.0.0; SM-A750FN Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Mobile/15E148 Safari/537.36\r\n",timeout,post,0,result,headers);


But resuts the same, doesnt work. Any tips pls? 

 
Fanur Galamov #:
It looks like Investing.com has tightened its anti-bot protections (they use Cloudflare), which is why you're getting a 403 error even with different User-Agents and Referers.

MQL5 can't handle those JavaScript-based challenges. The best option is to use an alternative API or set up a small proxy server to act as a bridge.
 
Miguel Angel Vico Alba # :
It looks like Investing.com has tightened its anti-bot protections (they use Cloudflare), which is why you're getting a 403 error even with different User-Agents and Referers.

MQL5 can't handle those JavaScript-based challenges. The best option is to use an alternative API or set up a small proxy server to act as a bridge .

But under the same conditions - in mt5 it works without problems.

 
Vitaly Muzichenko #But under the same conditions - in mt5 it works without problems.

That's a good point.

MT5 has a more modern HTTP implementation, so it handles things like SSL, headers, and cookies more effectively. MT4 is more limited in that regard, which is likely why the same request fails there.

Another reason to consider moving logic like this outside the terminal if it needs more flexibility.