Error parsing Google doc form url and my phpMyAdmin url | ThingSpeak Apps | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





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

Register Lost password?
sp_Feed sp_TopicIcon
Error parsing Google doc form url and my phpMyAdmin url
Avatar
djshah95
New Member
Forum Posts: 3
sp_UserOfflineSmall Offline
1
February 2, 2017 - 6:18 am
sp_Permalink sp_Print

Hi,

 

I am having problem parsing a google document form response.

 

I have a form ready and I have tried copying the xpath of the data which i need from thingspeak ThingHTTP via Google chrome and FireFox (Firebug).

 

The same problem arises for data from my phpMyAdmin server. I have made a database for my project and I am trying to get that Data from thingspeak ThingHTTP via Google chrome and FireFox (Firebug).\

 

Please Help me solve this problem.

PHP:

URL:http://34.194.161.164/phpMyAdmin/import.php#PMAURL-1:sql.php?db=TestDB&table=Patient+1&server=1&target=&token=36c7a84259ab3e9734d961f300d45483

 

Xpath://*[@id="table_results"]/tbody/tr[1]/td[1]/span

 

Google Doc:

 

URL:https://docs.google.com/forms/d/1D4QSNaPA0VYKwOgkLmH4OoPcmCiEdwVrNDqIB9PHc-s/edit#responses

 

Xpath://*[@id="ResponsesView"]/div/div[2]/div/div[4]/div[1]/div/div[2]/div/div[1]

Avatar
Hans
Natick, MA

Forum Posts: 390
sp_UserOfflineSmall Offline
2
February 2, 2017 - 8:44 am
sp_Permalink sp_Print

Interesting application... I would try leaving off the Xpath:// part of the XPath. 

Avatar
djshah95
New Member
Forum Posts: 3
sp_UserOfflineSmall Offline
3
February 3, 2017 - 9:49 am
sp_Permalink sp_Print

I tried doing that but there no change in the output.

 

It says "Error parsing document, try a different parse string"

 

As per the error I have tried parsing all other data on the webpage but none of them worked. As per my above post I have tried  gettign the Xpath via Google Chrome and Mozilla FireFox (Firebug) but did not work.

Please help me solving this.

Avatar
rw950431

Forum Posts: 252
sp_UserOfflineSmall Offline
4
February 3, 2017 - 10:35 pm
sp_Permalink sp_Print

I've had the same trouble in the past- there seems to be differences in the way different versions of the xpath parser work. Its also possible that the website you are scraping renders differently when accessed by thingHTTP than when your browser loads it.

I can only suggest that you start with shorter expressions and gradually refine your xpath.  I agree with Rob that you should leave out the XPath:

 

For example this is the xpath firebug gives me for the timestamp of the latest tweet on someone's twitter feed

/html/body/div[2]/div[2]/div/div[2]/div/div/div[2]/div/div[2]/div[4]/div/div[2]/ol[1]/li[1]/div/div[2]/div[1]/small/a/span[1]

 

Whereas this is the string that actually works in thingHTP

(//span/@data-time)[1]

 

In your case I would start with  //[@id="table_results"]  , get that to work and then drill down into the structure gradually. 

Avatar
djshah95
New Member
Forum Posts: 3
sp_UserOfflineSmall Offline
5
February 4, 2017 - 1:43 am
sp_Permalink sp_Print

I am new to the Xpath thing so would like to ask one thing that for example can I get the data by using xpath from phpMyAdmin database ?

 

I am getting that error then too. I am just entering the URL and the Xpath in the ThingHTTP. Is it anything i need to enter so as to get this thing work.

 

I have a project for which i need to get data from phpMyAdmin Database . 

 

And for the google document form. I am able to get the Data i.e the Question on ThingHTTP but i am unable to get the answer. For e.g Medicine name is my question which i am getting it on ThingHTTP but I am unable to get Crocin on ThingHTTP.

 

Error Still persists for both Google Doc form and phpMyAdmin!

 

Please Help!

Avatar
rw950431

Forum Posts: 252
sp_UserOfflineSmall Offline
6
February 5, 2017 - 6:59 pm
sp_Permalink sp_Print

I tried your google forms URL and found

 

//div[@id="ResponsesView"]/div/div[2]/div/div[4]   succeeds but gives an empty element but

 

//div[@id="ResponsesView"]/div/div[2]/div/div[4]/div[1] gives the error message.

 

So perhaps you can work from there..

I was unable to use [@class="...."] as a selector anywhere on that form.  

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: jacktheripper125
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

Nsneilotof

angieus2

goldiepw11

BinanceoSt

gnarender123@gmail.com

edenderest

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee