简单请求在特定 URL 上返回错误代码 ERR_UNESCAPED_CHARACTERS

Simple request returning error code ERR_UNESCAPED_CHARACTERS on a specific URL

总结

URL https://www.eponuda.com/graficke-kartice-cene/gigabyte-radeon-rx-6900-xt-16gb-gddr6-2‎56-bit-gv-r69xtgaming-oc-16gd-graficka-kartica-cena-579068 returns 错误如下,但其他 URLS return 预期 HTML 正文,例如 https://www.eponuda.com/graficke-kartice-cene/asus-geforce-dual-gaming-rtx-3060-12gb-ddr6-192bit-dual-rtx3060-12g-graficka-kartica-cena-609076。我对导致问题的原因一无所知。

代码

const options = {
    url: 'https://www.eponuda.com/graficke-kartice-cene/gigabyte-radeon-rx-6900-xt-16gb-gddr6-2‎56-bit-gv-r69xtgaming-oc-16gd-graficka-kartica-cena-579068',
    method: 'GET'
};

request(options, (error, response, body) => {
  console.error('error:', error); 
  console.log('statusCode:', response && response.statusCode); 
  console.log('body:', body); 
});

控制台

TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters

环境

software version
request 2.88.2
node 14.15.5
npm 6.14.11
Operating System Windows 10

尝试像这样编码 url

url: encodeURI('https://www.eponuda.com/graficke-kartice-cene/gigabyte-radeon-rx-6900-xt-16gb-gddr6-2‎56-bit-gv-r69xtgaming-oc-16gd-graficka-kartica-cena-579068')