user3460149
user3460149

Reputation: 35

Using importXML in Google Spreadsheets

I'm trying to get a value from this page http://socialblade.com/youtube/user/DragonBallzFullHQ the value that I'm trying to get is views for the last 30 days, it always seems to say "Imported xml content can not be parsed"

Here is my google drive importxml code

=ImportXML(A1, "//*[@id='youtube-summary-outer-wrap']/div[5]/p/span/text()[1]")

A1 is http://socialblade.com/youtube/user/DragonBallzFullHQ

Upvotes: 0

Views: 937

Answers (3)

aborruso
aborruso

Reputation: 5678

With the old version of gdrive it works. I have used: =ImportXML("http://socialblade.com/youtube/user/dragonballzfullhq";"//div[@class='content-module']/div/div[6]/p/span/text()[1]")

To create and old version use http://g.co/oldsheets

Upvotes: 0

Aurielle Perlmann
Aurielle Perlmann

Reputation: 5509

this should work, i tested it:

=IMPORTXML(A1,"//*[@id='afd-header-views-30d']")

Upvotes: 1

AndriuZ
AndriuZ

Reputation: 656

Usually better use direct approach (not copy xpath from chrome but inspect element):

//span[@id="afd-header-views-30d"]/text()

Upvotes: 0

Related Questions