ImportXML not returning entire table - google-sheets

I cannot get an entire table to populate with ImportXML. At best I get the first column and I cannot figure this out.
The website I am trying to scrape is: https://classic.warcraftlogs.com/character/us/kromcrush/chills
Do I have any options to retrieve the table rather it be column by column or as a whole?
I have tried all the following plus several others.
=IMPORTXML("https://classic.warcraftlogs.com/character/us/kromcrush/chills","//table[#id='boss-table-1010']/tbody/tr")
=IMPORTXML("https://classic.warcraftlogs.com/character/us/kromcrush/chills","//tbody/tr")
=IMPORTXML("https://classic.warcraftlogs.com/character/us/kromcrush/chills","//tbody/tr/td")
=IMPORTXML("https://classic.warcraftlogs.com/character/us/kromcrush/chills","//tr")
=IMPORTXML("https://classic.warcraftlogs.com/character/us/kromcrush/chills","//tr/td")
=IMPORTXML("https://classic.warcraftlogs.com/character/us/kromcrush/chills","//tr/td[1]")
=IMPORTXML("https://classic.warcraftlogs.com/character/us/kromcrush/chills","//tr/td[2]")
Anything outside of column one says Imported content is empty. Please help!
P.S. I have scoured this website and google for answers and every case I find seems to be a syntax error, starting at the table itself doesn't return the entire table which tells me I need a clever method.

It seems that's an issue with the website, because when you click on Inspect you can see the table with id "boss-table-1010" but if you click on View Source that ID is not available, so the table is dynamically rendered and Sheets doesn't find such id.
I've checked it and I can get the data by doing
=IMPORTXML("https://classic.warcraftlogs.com/character/us/kromcrush/chills", "//table/tbody//td")
But if you want a more robust solution, it'll be better doing it programmatically by using Python for web scraping

Related

Grab automatically content from a website to my Google sheet

I want to to grab automatically content from a website to my google sheet.
I am having the following problem.
What is wrong in my formlua?
You must ommit the S from table.
It is table not tables.
https://youtube.com/video/d3YptmCbM9Q/edit
the correct syntax is:
=IMPORTHTML("url"; "table"; 1)

How do I use importXML/importHTML to retrieve a stock options chain that is hidden?

I am trying to use importXML or importHTML function to retrieve a stock options chain, specifically using this function to get a table. So far, this is what I have:
=importhtml("https://bigcharts.marketwatch.com/quickchart/options.asp?symb=TSLA","table",3)
The problem I'm getting is that I can't retrieve "hidden" tables. For example, if you go on the website: https://bigcharts.marketwatch.com/quickchart/options.asp?symb=TSLA
If you scroll down on this page the hidden tables would only be revealed if you click on ,"show april 2022", "show may 2022", etc. I am trying to retrieve all of this information.
The end result is that I would like to create a table that looks like this:
https://www.barchart.com/stocks/quotes/tsla/put-call-ratios
And a table that looks like this:
https://www.barchart.com/stocks/quotes/TSLA/options?moneyness=10&view=stacked&expiration=2022-04-14-m
As a result, there are two things that I am trying to create, the above tables shown on barchart.
I have tried to use importHTML or importXML on barchart, but it looks like it's not allowed. If there is a way to directly retrieve the information from barchart, that would be a much better solution rather than having to import all of the data separately using a different website.
Please note, that I do have a beginner knowledge, so a step-by-step solution on what to do would be very helpful. Thank you

From where can we retrieve next_available_date for Available-to-Promise in Oracle-EBS?

I'm supposed to get next_available_date for an item from the backend. I'm able to see it in the frontend(application). The record history for that particular column is disabled. So I'm unable to figure from where they are getting it.
I've checked in mrp_atp_schedule_temp table. But I don't think it's where it is coming from. I've also tried the API in the below link, but it didn't help
https://oracleappstechblog.wordpress.com/tag/mrp_atp_pub-call_atp/

finding an accurate Xpath for Google Sheets ImportXML [duplicate]

This question already has answers here:
Scraping data to Google Sheets from a website that uses JavaScript
(2 answers)
Closed 4 months ago.
So, I'm trying to use the ImportXML function in Google sheets to scrape some data from a website (https://www.cargurus.com/Cars/m-Bob-Johnson-Certified-Collection-sp402449), and I'm having trouble finding a path that works. This is the section I'm looking to pull.
I've tried using Chromes Inspect Element and using Copy X-path, Which gives me
//*[#id="ratingFilter_ContainerId"]/div
and returns #NA
I've used a Chrome plug-in called Scraper, which gives me //div[13]/div/div[2]/div[2]/div/label and returns #NA
I've even tried going through the code and making as direct a path as I could from scratch and came up with //body/div[1]/div[1]/main/div[1]/div[1]/div[11]/div[1]/div[1]/div[2]/div[2]/div[1]/div[1]/div[3]/div[1]/div[4]/div[2]/div[13]/div[1]/div[2]/div[2]/div
which also return #NA
So any tips for finding an accurate XPath would really be appreciated.
The expression
//*[#id="ratingFilter_ContainerId"]
executed on a fetched document selects a div element two levels above the one you show.
When extended by another step subexpression:
//*[#id="ratingFilter_ContainerId"]/div
it selects the div which contains the 'Deal Ratings' caption with the '(clear)' link at the right side, and the options list you need.
What you are interested in is rather
$fetched-document/descendant::div[#id="ratingFilter_OptionListContainer"]
EDIT
BTW, are you sure you fetch the page properly? When I load it into my browser, the page seems to load some additional data, which is noted with a 'Loading listings...' splash. Maybe you're trying to execute your query on an incomplete page...?

confused how to use opentables in yql

i am trying to get access to whitepages using YQL. Unfortunately i don't have much experience with opentables.
I was directed to the whitepages xml file at:
http://github.com/spullara/yql-tables/blob/c63212b2ac9db6feb77ae3cecace51ed52e08c01/whitepages/whitepages.search.xml
Does anyone know how to use this table to extract meaningful information using YQL?
Specifically, I'm not sure how to make a query in YQL using this table to search for a person's name.
Help?
Go to the YQL console http://developer.yahoo.com/yql/console/ and click Show Community Tables. That should make the list on the right much bigger, and will include your table.
have you tried to put
&env=http%3A%2F%2Fdatatables.org%2Falltables.env
at the end of your request?

Resources