google-sheets-importxml

XPath simple conditional statement? If node X exists, do Y?

左心房为你撑大大i 提交于 2021-02-19 01:34:24
问题 I am using google docs for web scraping. More specifically, I am using the Google Sheets built in IMPORTXML function in which I use XPath to select nodes to scrape data from. What I am trying to do is basically check if a particular node exists, if YES, select some other random node. /*IF THIS NODE EXISTS*/ if(exists(//table/tr/td[2]/a/img[@class='special'])){ /*SELECT THIS NODE*/ //table/tr/td[2]/a } 回答1: You don't have logic quite like that in XPath, but you might be able to do something

xpath to obtain texts between 2 tags in IMPORTXML formula

狂风中的少年 提交于 2021-02-11 17:01:36
问题 EDIT- I have changed xpaths. odds xpath and result xpath are exactly what I want. But the Race url and race num do not correspond to this data. I have found an xpath that returns the info that I need but it returns all data and I only need data between Australia and new zealand. I have 3 xpaths that I need refined. Sample URL: https://www.punters.com.au/form-guide/2020-02-06/ Race URL XPATH - //*[@class='component-wrapper form-guide-index']/table1/tbody/tr//td/a/@href Race Result XPATH - /

Google Sheets: How to import the following data?

北城以北 提交于 2021-02-11 05:00:07
问题 Data Source https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yieldAll I am trying to get the following data onto a Google Sheet, but it is looking to be tricky to do so using IMPORTXML. Any idea how to do it? 回答1: You want to retrieve a table from the HTML data of the URL. From I am trying to get the following data onto a Google Sheet , I thought like this. If my understanding is correct, how about this answer? Issue and workaround:

Google Sheets: How to import the following data?

二次信任 提交于 2021-02-11 04:57:45
问题 Data Source https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yieldAll I am trying to get the following data onto a Google Sheet, but it is looking to be tricky to do so using IMPORTXML. Any idea how to do it? 回答1: You want to retrieve a table from the HTML data of the URL. From I am trying to get the following data onto a Google Sheet , I thought like this. If my understanding is correct, how about this answer? Issue and workaround:

Import table using IMPORTXML

点点圈 提交于 2021-01-29 10:59:23
问题 I am trying to pull the table from https://rotogrinders.com/schedules/nfl into Google Sheets I tried using ImportHTML("https://rotogrinders.com/schedules/nfl", "table", 1) but it just returns the header: Time Team Opponent Line Moneyline Over/Under Projected Points Projected Points Change Using ImportXML, I tried IMportXML("https://rotogrinders.com/schedules/nfl","//tr"), but it returns the same header and no data. I dont think the tbody needs authentication to access. I logged out, cleared

Google Sheets — ImportXML function. Receiving Error?

与世无争的帅哥 提交于 2020-07-31 04:23:27
问题 I'm trying to use the IMPORTXML function on Google Sheets. For example: =IMPORTXML("https://www.tiktok.com/@charlidamelio?lang=en", XMLPATH) should return "72.6M" I used the Chrome inspector to copy the xpath, which gives me: /html/body/div[1]/div/div[2]/div/div[1]/div/header/h2[1]/strong[2] When I try this in Google Sheets it returns an error: #N/A (Import Content is Empty). P.S. I'm open to other ways to get the data I need into the google sheet, it doesn't have to use the IMPORTXML

Google Sheets — ImportXML function. Receiving Error?

瘦欲@ 提交于 2020-07-31 04:23:13
问题 I'm trying to use the IMPORTXML function on Google Sheets. For example: =IMPORTXML("https://www.tiktok.com/@charlidamelio?lang=en", XMLPATH) should return "72.6M" I used the Chrome inspector to copy the xpath, which gives me: /html/body/div[1]/div/div[2]/div/div[1]/div/header/h2[1]/strong[2] When I try this in Google Sheets it returns an error: #N/A (Import Content is Empty). P.S. I'm open to other ways to get the data I need into the google sheet, it doesn't have to use the IMPORTXML

Google Sheets importXML Returns Empty Value

半腔热情 提交于 2020-07-09 16:08:07
问题 Im trying to scrape this website (https://kamadan.gwtoolbox.com/) with google sheets for material costs for a game that I play. There are two tables; "Common Materials" and "Rare Materials" in a drop down in the top right corner. I am trying to pull the values for both as the prices update. I copied the full Xpath and used the function below in an empty cell on a sheet. =importxml("https://kamadan.gwtoolbox.com/","/html/body/div[2]/div[1]/div/div[2]/table/tbody") This returns a #N/A error