It is currently August 10th, 2020, 3:59 pm

Little help

Help with creating, editing & fixing problems with skins
User avatar
Yincognito
Posts: 2223
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Little help

Post by Yincognito »

JamX wrote: July 24th, 2020, 8:21 pm it seems the regexp error has nothing to do with the "white" values
Capture3.JPG

Now, at 20:03, I had an error and the values are till now OK, but I made some changes...

I've taken a look at the original code from the Author Mordasius where het states:


So I added my useragent: MyUserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36 Edg/84.0.522.40

and added it into the code like:

Code: Select all

[InfoIndex1]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol1#
UserAgent=#MyUserAgent#
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#
FinishAction=[!Log "Quote Update Finished"]
I also changes #UpdateQuotes# to 60 in stead of 15

Question:
What does the useragent actually do?
Before I had NO agent and sometimes the values turned white but most of the time (>95%) values were displayed OK
Now I have an agent and til now (knok on wood) the values are displayed OK
In this case, the user agent string is trying to trick the site into believing that it has been opened up from a browser.
User avatar
JamX
Posts: 179
Joined: October 4th, 2019, 2:46 pm

Re: Little help

Post by JamX »

So, I. General you could say that I do not need a user agent because I alway get the values from the site dispite sometimes assigning the wrong color to it (White)

Maybe increasing the Update rate solved the issue. Till last evening no White values shown
User avatar
Yincognito
Posts: 2223
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Little help

Post by Yincognito »

JamX wrote: July 25th, 2020, 9:34 am So, I. General you could say that I do not need a user agent because I alway get the values from the site dispite sometimes assigning the wrong color to it (White)
Yes, indeed. If the user agent was the problem, you wouldn't have been able to extract the data from the site in the first place.