0

Solution: I used PYTHON and retrieved the text using SELENIUM, since I had to login and it was easier using automated chrome. Thanks!

I've a web URL which returns a plain text.

The URL Looks like this: http://xxx.xx.xxx.x/cgi-bin/p05_equip_sample.cgi?_equipId=7&_op_type=1

and it returns a plain text like this one: '' 4017,机房UPS,ENP_UPS_NXC304060K[COM]^2,Input Voltage of Phase A,240.500000,V,1581995093,0,1,1,2,2;3,Input Voltage of Phase B,234.100006,V,1581995093,0,1,1,2,2;4,''

which are values from different sensors that I want to include into a JS Heatmap plugin.

What I need to do is include all that text into a var so I can extract the characters that I need (I know it's not the best solution, but text position never changes, only values). I tried to use Jquery with GET but I think I'm missing something and with other methods I get a CORS warning. I need to do it on client side so no NODE.JS or PHP I guess.

Thanks!!!

Lito
  • 13
  • 2
  • 1
    If the URL is on another server, the code on your client cannot access it, that's what CORS is. You need their server to add a CORS exception for you. If that's not possible, you will need to use some server-side code like Node.js or PHP to retrieve the data first. – gingerCodeNinja Feb 17 '20 at 19:02
  • Thank you! I will try PHP since this page comes from a propietary sensors appliance, that doesn't allow us to add CORS. – Lito Feb 17 '20 at 19:46

0 Answers0