0
votes

I'm trying to keep tabs on the gameweek scores within the premier league fantasy football website.

The webpage I am trying to import xml from is http://fantasy.premierleague.com/entry/79000/event-history/1/

The XPATH (taken using XPATH HELPER extension in Chrome) is

html[@class=' js flexbox canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths']/body/div[@id='body']/div[@class='ismWrapper']/div[@class='ismContent clearfix']/div[@id='ism']/section[@class='ismSecondary']/div[@class='ismMod'][1]/div[@class='ismModBody']/dl[@class='ismDefList ismRHSDefList']/dd[1]

The result should be 38. I get an "Import Internal Error" from the following

=IMPORTXML("http://fantasy.premierleague.com/entry/79000/event-history/1/", "//html[@class='js flexbox canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths']/body/div[@id='body']/div[@class='ismWrapper']/div[@class='ismContent clearfix']/div[@id='ism']/section[@class='ismSecondary']/div[@class='ismMod'][1]/div[@class='ismModBody']/dl[@class='ismDefList ismRHSDefList']/dd[1]]")

Any ideas?

1

1 Answers

0
votes

Your xpath is far far too complicated - with these, especially in google docs it is actually better to be a little less complex and more vague but starting with a wildcard and then specifying the closest unique class, then narrow it down if needed.

Try this:

=IMPORTXML("http://fantasy.premierleague.com/entry/79000/event-history/1/","//*[@class='ismModBody']/*/dd[1]")