Something changed about a month ago and even the published example no longer works for ThingHTTP | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Something changed about a month ago and even the published example no longer works for ThingHTTP
No permission to create posts
September 30, 2017
3:21 pm
Avatar
bubba198

Silver
Members
Forum Posts: 8
Member Since:
November 16, 2015
sp_UserOfflineSmall Offline

Hi everyone,

Something changed about a month ago and even the published example no longer works for ThingHTTP?

Here's the example which no longer works straight out of the ThingHTTP setup window:

https://imgur.com/eXvWcMy

How does one make it work again with whatever changes have occurred?

Thank you

~B

September 30, 2017
3:29 pm
Avatar
Vinod

MathWorks
Members
Forum Posts: 201
Member Since:
May 1, 2016
sp_UserOfflineSmall Offline

ThingHTTP as such has not changed. 

Google changed the google finance website. Change the URL field to https://finance.google.com/finance and everything else should work as is. It will be interesting to see what additional changes come in November, now that Google has announced that the Google finance page will be changing.

September 30, 2017
3:33 pm
Avatar
bubba198

Silver
Members
Forum Posts: 8
Member Since:
November 16, 2015
sp_UserOfflineSmall Offline

Thank you - confirming that the URL you suggested does work! Thanks. Maybe someone would update the example under ThingHTTP.. Thank you

Vinod said
ThingHTTP as such has not changed. 

Google changed the google finance website. Change the URL field to https://finance.google.com/finance and everything else should work as is. It will be interesting to see what additional changes come in November, now that Google has announced that the Google finance page will be changing.  

October 2, 2017
1:25 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 222
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

Also, it looks like google changed the unique ID to #ref_626307_l from #ref_626307_c.  

March 28, 2018
9:52 am
Avatar
bubba198

Silver
Members
Forum Posts: 8
Member Since:
November 16, 2015
sp_UserOfflineSmall Offline

Now Google Finance is completely broken, none of the examples work and the new #ref_626307_c also doesn't work. 

Any ideas anyone?

~B

March 28, 2018
10:50 am
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 222
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

Google is making changes quite frequently.  You can get the S&P value, and a bunch other values from Marketwatch.

In your ThingHTTP:

Enter https://www.marketwatch.com in the URL field
Enter GET in the Method field
In the Parse String field, enter the XPATH
/html/body/header/div[2]/div[1]/div/div[1]/table/tbody/tr[2]/td[4]/bg-quote

This will give the present value of the S&P 500, not the change for the day.

March 28, 2018
6:32 pm
Avatar
bubba198

Silver
Members
Forum Posts: 8
Member Since:
November 16, 2015
sp_UserOfflineSmall Offline

@cstapels -- Thank you, Marketwatch did work, none of the other sites work even though I copy the XPATH using Chrome just as I did for Marketwatch. 

The issue at hand is solved but I am curious nonetheless, is there some kind of defect with using XPATH if so many sites simply do not work even though I inspect the element carefully and copy and paste the XPATH using the browser function (no human typing it of course)?

Thanks

~B

March 29, 2018
4:44 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 222
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

Many of these sites use code that calls some other process or script to populate the number you see.  The xpath to the number you want is correct, but the number is not yet there when you ask urlfilter() to parse the page.  The function does not wait for any other scripts to complete. 

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: Hans, agrisensezm
37 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

Archieter, JamesExedo, IrbosHich, brodi, kasko, franklin castro

Administrators: Hans: 387, lee: 457