XPath query, IMPORTXML & Google Sheets - Advanced Tutorial

Поділитися
Вставка
  • Опубліковано 18 жов 2024

КОМЕНТАРІ • 273

  • @skytechbits
    @skytechbits 4 місяці тому

    Thank you so much for actual troubleshooting and without any transitions while doing the tutorial.

  • @theanilbhattarai
    @theanilbhattarai 6 років тому +3

    I watched almost 10+ videos on trying to scrape data from urls in Google sheets. This tutorial made it extremely clear on how to execute what I had planned. Awesome Video, Nicely Explained! Thank you so much ^_^

  • @baawaa1949
    @baawaa1949 6 років тому +9

    Excellent tutorial! I like the way that it is composed where you encounter unexpected results (duplicates) and go through the troubleshooting process to correct them. Well done!

  • @Cc-vu9mr
    @Cc-vu9mr 3 роки тому +3

    I just love this channel. It's perfect for me, I learn so much and improve instantly after seeing a video. The one thing I like the most is that it's done step by step and they're explained in detail.

  • @josebarragan9227
    @josebarragan9227 3 роки тому +1

    MY MANNN!! I'm a newbie and I have been trying to figure this out for hours... but you came through. Nice video your delivery is good. I had no idea I'd been watching this for almost an hour lol

  • @MK-ih6wp
    @MK-ih6wp 5 років тому +5

    32:00 I'm loving this SPLIT() function! And displaying the img right in the spreadsheet- SO useful.

  • @daytodatainc.2520
    @daytodatainc.2520 7 років тому +5

    What a great tutorial! explains everything from beginning to end. Great Job!!

  • @takaakiyamada7294
    @takaakiyamada7294 3 роки тому +2

    Wonderful tutorial about XPath! As I arrived at this video too late, the structure of the UA-cam page had been changed. So it was impossible to get the data by the way this tutorial instructed. Anyway, this tutorial taught me a lot. Thank you so much. :-)

  • @MK-ih6wp
    @MK-ih6wp 5 років тому +1

    Loving ALL the videos on this channel! But this really is one of the best xpath videos I've seen on YT. Thank you!!

    • @hamzarafiq2459
      @hamzarafiq2459 4 роки тому

      I would like the proper Xpath to use in Google Sheets such that =IMPORTXML("services.rsna.org/playbook/v1/playbook/complete/cpt/71250",xpath) returns RPID16. Or for example 74177 would return RPID145. You can try IMPORTDATA will the same URL to get the entire XML.
      In fact, I think the answer is close to something like "//*[local-name()='PlaybookTerm']/@radlexPlaybookId" but I do not get it in sheets.

  • @ronald3921
    @ronald3921 4 роки тому +4

    This really helped me out when writing the XPath query, thank you so much for clear instructions. What I don't understand is, why when I inspect element, right-click to 'copy XPath' doesn't provide the correct path, at least not for google sheets

    • @huynguyen7048
      @huynguyen7048 4 роки тому

      I think UA-cam updated the HTML script, so if we used the his formula, it's no longer working. I'm a HTML newbie, so I can't figure out how to update the formula to grab what we want. lol

  • @frederics7199
    @frederics7199 6 років тому +1

    Best tuto ever. You definitely have got a gift for explaining stuff man. Keep up the good work!

    • @hamzarafiq2459
      @hamzarafiq2459 4 роки тому

      I would like the proper Xpath to use in Google Sheets such that =IMPORTXML("services.rsna.org/playbook/v1/playbook/complete/cpt/71250",xpath) returns RPID16. Or for example 74177 would return RPID145. You can try IMPORTDATA will the same URL to get the entire XML.
      In fact, I think the answer is close to something like "//*[local-name()='PlaybookTerm']/@radlexPlaybookId" but I do not get it in sheets.

  • @JordiRPuxench
    @JordiRPuxench 4 роки тому

    Awesome tutorial. It solved in minutes all the doubts I had with the XPath query. Congrats and tx!!

  • @pablonicolasvillanueva8708
    @pablonicolasvillanueva8708 2 роки тому +1

    Dude, you're amazing! So useful info. Thanks a lot!!

  • @tylercroskey2462
    @tylercroskey2462 3 роки тому

    The video was very helpful. Honestly to good to be on youtube and should be taught in a class.

  • @LucXX36
    @LucXX36 4 роки тому

    This guy is cool. You won me over at 33:37 at the latest with your calm and nice kind

  • @mosesdunga
    @mosesdunga 5 років тому +1

    Your explanation is awesome. You helped me to reach my goal... my heartfelt thanks

  • @salvadorperez5488
    @salvadorperez5488 3 роки тому

    Fantastic explanaton, and so detailed. I thank you for the time you spend to do such a useful video.

  • @nvcworld6423
    @nvcworld6423 5 років тому

    i belive this is one of the best video on UA-cam that watching , after watching this video I have played more than 48 hrs to pull a table from a site but not got any success , can you please help me in same ?

  • @huynguyen7048
    @huynguyen7048 4 роки тому +1

    Very clear video instruction about XPath query. Thank you for your effort. I'm trying to learn as much as I can from you. You're genius. I have one question that I hope you can help me. It seems like youtube updated its script. No more Ul & Li in the script. Instead Div has Id name now. How can I refer the Div with ID name in my formula? Thank you so much and I really appreciate if you can help me with this stupid question

  • @crzyofficial7658
    @crzyofficial7658 4 роки тому

    thanks this wasnt exactly what i needed but i managed to get the just of how to find the exact class i needed

  • @janekaze
    @janekaze 8 місяців тому

    Excellent tutorial Thankyou.

  • @idomnychireno
    @idomnychireno 2 роки тому

    Thank you. I do xml editing for work and your explanation of xpath is very useful for me. I would love to see you explain how to edit xml in mass I.e.all files in one folder and delete child elements that have an specific grand child. This will be very useful for me and others.

  • @educacionportable
    @educacionportable 2 роки тому +1

    Excellent content!

  • @pedroivocubas4105
    @pedroivocubas4105 4 роки тому

    thank you so much for teaching this in such level of didactic

  • @kritishah1659
    @kritishah1659 3 роки тому

    This is very helpful sir. I am using smart editor for XPath SelectorsHub, it is very much time saving and helpful. You might like to try it, its a browser plugin.

  • @marcmolloy5446
    @marcmolloy5446 6 років тому +20

    Awesome video... but my problem is that no matter what I do my queries come up "Empty"

    • @dishydez
      @dishydez 3 роки тому +1

      Its probably not stored via Xpath then. I usually use ImportHTML if this is the case. You could also use other Import functions. Also look out for his video on import JSON that is also helpful

  • @allfootage3558
    @allfootage3558 3 роки тому

    Very Informative Tutorial, I learn alot from this. Just one more question How to scrape the items loaded via a "view more" button in google sheets.

  • @mikeparker444
    @mikeparker444 2 роки тому

    This is an excellent video man.

  • @phulm
    @phulm 5 років тому +11

    In June 2019 the @class addition no longer seems to work as advertised, even with WebScraper or Scraper.

  • @PropertiDong
    @PropertiDong 4 роки тому

    This is a good tutorial for a newbie like myself, thank you... !

  • @tibolefevre
    @tibolefevre 6 років тому

    What a great video. Awesone. Thanks a lot for your job !

  • @Xein24
    @Xein24 Рік тому

    for tag .... which should be Xpath? please tell

  • @dodgersv3
    @dodgersv3 5 років тому

    Great instructions... your are the best!

  • @itsJLa
    @itsJLa 5 років тому +1

    Thank you so much for your amazing and easy to follow tutorials! I can't seem to figure out how to resolve the "Error
    Resource at url contents exceeded maximum size" on Google Sheets using importXML and was wondering if you had a video covering that subject.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому +1

      Unfortunately it might be impossible to resolve this problem. At least not without doing some crazy complicated things.

    • @itsJLa
      @itsJLa 5 років тому

      @@ExcelGoogleSheets I was browsing on different forums to see if there are solutions around this issue and came accross a Reddit page with someone having the same issue
      www.reddit.com/r/googlesheets/comments/an7qbb/scrape_website_directory_for_names_with_custom/
      And the page with the solution...but I have yet to get it to work properly
      webapps.stackexchange.com/questions/97629/google-sheets-why-wont-importxml-work-on-this-sheet/114124#114124

  • @rolpablo
    @rolpablo 3 роки тому +1

    Incleible video!!!!

  • @michaelionita
    @michaelionita 3 роки тому

    Very helpful! Thanks.

  • @Kuzmitch2010
    @Kuzmitch2010 2 роки тому

    Thank you, it's super helpful!

  • @RaelDilldeMello
    @RaelDilldeMello 6 років тому

    Amazing channel... all your videos man, your rock!
    Tx so much :)

  • @LucasErtola
    @LucasErtola 3 роки тому

    Thanks @learn Google Spreasheets. Super useful video. But you solve the partial loading, or loading when scrolling? to import all data and not only the one that loads first.

  • @TheDoggyOnTheWall
    @TheDoggyOnTheWall 5 років тому

    Great detailed tutorial. Thanks!

  • @benponderin
    @benponderin Рік тому

    dude , you're magic

  • @bobocathk
    @bobocathk 4 роки тому

    Great training. If only top 30 videos data can be listed by using this method?

  • @moneymaker8227
    @moneymaker8227 2 роки тому

    Good tutorial.!! I have a question.. I would like to know how import data to google sheet in cells that are already filled by other data. ??
    I'm trying to automate my stocks imported financial data (income statement, balance sheet, cash flow statement) but I'm only able to import one by one because google sheet cells are already filled by the first stock data I imported.!
    How Can I RESOLVE This Issue.??
    Thanks

  • @billjones3720
    @billjones3720 5 років тому

    Very informative. Thank you.

  • @giamar3026
    @giamar3026 5 років тому

    Very usefull!, as all your videos. Thk you. One question: i practice on a market page and could sucesfully extract products and prices, but when i wanted to extract special prices, as not every product have an special price, the sequence cut and stop when system found one product without special price, so the followings products didn't bring me anything, no matterthey have or not special prices,. Is there a way to fix this?

  • @Garen1
    @Garen1 4 роки тому +1

    Amazing video! I was wondering if there is a way I can contact you via email with a problem I am having regarding getting specific data into google sheets?

  • @adibzainal3991
    @adibzainal3991 3 роки тому

    best tutorial ever!

  • @DavidElstob73
    @DavidElstob73 3 роки тому

    Amazing timesaver for economic reports, but it is a concern if the website changes and the data is wrong, so still need to have a quick glance at the website and adding other safety checks.
    For example, I'm going to include a text column with my four numerical columns, so I can easily see if it has changed, because numbers will be harder to check at a glance than something like "percent of GDP".

  • @TheRangeControl
    @TheRangeControl 4 роки тому

    Why did it only pull the title and NOT the link when you did the anchor at : #10:20 ?
    I mean, the encloses both a title AND a link, so why only part of it?

  • @JesseGeorgePenner
    @JesseGeorgePenner 3 роки тому +8

    Is there a reason why '=IMPORTXML("ua-cam.com/users/LearnGoogleSpreadsheetsvideos","//ul/li//h3/a")' doesn't work anymore? I tried the exact same formula from this video in a google sheet, and I get an #N/A error saying the imported content is empty

  • @aliosmanozen196
    @aliosmanozen196 6 років тому

    Great tutorial, thank you very much.

  • @RoberioDias
    @RoberioDias 7 років тому

    Very good lesson! Thanks a lot!

  • @אריאלבריל
    @אריאלבריל 4 роки тому

    Great video!
    Thanks 😁😁

  • @igorchernysh9764
    @igorchernysh9764 5 років тому +1

    @Learn Google Spreadsheets
    I have a question, is there any command or smth that will help to get data which can be retrieved only after pressing a specific button on a page like "see more" or "change currency" or "left/right"?
    Pressing a button doesn't change the initial url, so I can't use a modified ulr for importxlm.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому +1

      You'll need to write a script for that. Not in stock functionality.

  • @ianfinlayAustralia
    @ianfinlayAustralia 6 років тому

    Excellent presentation

  • @hardikpanchal8106
    @hardikpanchal8106 5 років тому

    Thank u so much for the video
    I want to know that the information if change daily than in spreadsheet also it's changed automatically or we have to keep refresh the sheet

    • @5953kim
      @5953kim 5 років тому

      Per one hour refresh importxml function automatically.

  • @dbtech429
    @dbtech429 2 роки тому

    Great Video!

  • @jameswotring9432
    @jameswotring9432 5 років тому +3

    Does this list update automatically? for example your views column?

  • @allanbsoliveira1
    @allanbsoliveira1 4 роки тому

    it helped me a lot. thanks !

  • @sachidanandsadhguru3703
    @sachidanandsadhguru3703 15 днів тому

    Thank you very much. But, can you or anyone reading this guide me to use IMPORTXML to extract a particular row which contains specific text like "EPS" in its first column from a Table which doesn't have a name?

  • @bakataoako4202
    @bakataoako4202 3 роки тому

    hi I like your video, i just wanna ask if is there any way to get the dynamic data?

  • @SayafAmer
    @SayafAmer 2 роки тому +1

    Thank you for this amazing tutorial.
    However, I followed the same steps, but I could n't get the same results you had. Maybe UA-cam has added protection to avoid scraping. Can you please check?
    If everything is fine, that means we need more practice and watch more tutorials from you. So It would be apprectiated if you could arrange another tutorial. :)

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому +1

      UA-cam now loads data using JavaScript, so this won't work on UA-cam anymore.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому +1

      Otherwise everything is the same.

  • @igorchernysh9764
    @igorchernysh9764 5 років тому

    @Learn Google Spreadsheets
    Thanks for the video!

  • @심심-p7z
    @심심-p7z Рік тому

    thanks for nice explanation.
    i tryed to apply your explanation to scrape google news but it didn't work.
    can you make video to google news scrape using google sheet?
    especially you google certain words with "recent " filter.

  • @dimitrioschantzis4647
    @dimitrioschantzis4647 3 роки тому

    Great video, I apply the importxml function to Google Sheets and other times it works and other times (without changing anything) it gives me #N/A into cell. What can I do? Thank you very much

  • @veevee7555
    @veevee7555 Рік тому

    Super sir thanks 🙏

  • @walkingowl6810
    @walkingowl6810 7 років тому

    thank you so much!
    Precise and clear :D

  • @JesseGeorgePenner
    @JesseGeorgePenner 3 роки тому +1

    Can you tell me why, when I right click the element and copy as Xpath or full Xpath, and paste it into my formula, it doesn't work?

  • @bradynmyers4599
    @bradynmyers4599 5 років тому

    Hi there,
    Awesome content man, im learning so much!
    I have a question/problem I need some help with.
    , I seem to be getting a limited number of returns on my data when i try to extract similar data to you in this video. What is the reason that would be happening? I'm using "*" before "//" so i cant search everything, but even when the page is refreshed and there are a different order of items, the XML still only returns 48 rows. Any clues?
    Thanks

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому +1

      Impossible to say, so many things happen with each website. It's pretty much case by case when it gets to this type of problems.

  • @Victor-vp7kn
    @Victor-vp7kn 4 роки тому +1

    Hello, I would like to know if it possible to have a one time class ( 30 min. ~ 1 hour) at a fair price. I need to extract certain info from a webpage and import into googlesheets? Thank you Vic

    • @damiannika1296
      @damiannika1296 3 роки тому

      Me to please. dn@askdamian.net. Thanks in advance!

  • @J-J_du4nb
    @J-J_du4nb 2 роки тому

    Easiest way to find the XPath on a page is:
    - Right click section or word > inspect
    - Then right click highlighted line in "Inspect Elements" that just popped up
    - Click copy > scroll down and click "Xpath"

  • @MrArthurRibeiro
    @MrArthurRibeiro 4 роки тому

    Tks 4 the lesson

  • @sohamkambale
    @sohamkambale 4 роки тому +2

    I have an issue. I am trying to scrape historical data from Yahoo finance, It has 535 rows. But my function is returning only 100 rows. How can it be solved? Great Video btw.

    • @MRSHOAIBJEE
      @MRSHOAIBJEE 4 роки тому

      It is better to check the references of 100 onward then try.

  • @binodmaharjan9981
    @binodmaharjan9981 4 роки тому

    Very nice tutorial. But I have a problem that how to get data if the data is long and splitted into multiple pages like we have to click next button to load that data into the webpage. Please help me out

  • @johnhe9984
    @johnhe9984 2 роки тому

    Can you post a video on how to import desired data from yahoo finance into google sheets? for example, total debt in balance sheet.

  • @suleymanozturk746
    @suleymanozturk746 2 роки тому

    Thx . Perfect 👍👍👍👍

  • @Sulaimangalib
    @Sulaimangalib 3 роки тому

    I want to grab data from a site, but some of them have missing info, and it doesn't put a blank cell for the missing info. Is there any way to solve the problem?

  • @TheQAAA
    @TheQAAA 6 років тому

    Hello, the video is great , I there way to get the xPath of anything without going in all this instructions? best regards

  • @trinhdinh8413
    @trinhdinh8413 6 років тому

    Will you be able to use importXML to extract data from UA-cam Analytics? Or will there be limitations because of authorizations in Channel access?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому

      No, you need authorization and other things as well. You can hookup to UA-cam API through Apps Script.

  • @guruntr6481
    @guruntr6481 6 років тому

    Very well done...

  • @Shkur777
    @Shkur777 4 роки тому

    Thank you for tutorial. What about auth credential? Token or login/pass

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +1

      This doesn't support login/pass unless it can be passed as a part of the URL.
      You will have to write a script with Apps Script UrlFetchApp.

  • @manikandankbis7977
    @manikandankbis7977 3 роки тому

    Excellent tutorial... Could you please help me with xpath syntax for scraping the product price from Amazon??

  • @TheQAAA
    @TheQAAA 6 років тому

    hello very good video , Actually I am working in pulling some data from SCOPUS web and It works fine, but some of the info that I importing them does not display of appear in the cell of spreadsheet even it showing , Can you help ? Thanks

  • @justfly2525
    @justfly2525 6 років тому

    All of your videos are awesome... I'm trying to be lazy... I was able to double click directly on the element that I wanted then hit... copy... copy x path. That seemed to give me the complete and exact x path. Having said that gsheets said it was empty and it didn't work.

  • @mariebeyssac1749
    @mariebeyssac1749 3 роки тому

    Thank you!!!

  • @alexzhang5816
    @alexzhang5816 5 років тому

    Hi, I am trying this on a website, the information I am seeing through chrome is not the same as I am getting in sheet from the URL in the address bar. I am assuming the site has some kind of web scraping countermeasures. Is there any way to get around it?

  • @minh5minh5
    @minh5minh5 5 років тому

    hello i'm korean thanks for your lecture but i have one question. nowadays no li tag...how can i spreadsheets code ~?

  • @abdulwali4920
    @abdulwali4920 Рік тому

    hi there, can you please tell me how can i use a (google search link) to search anything on google and grab top 3 links from google and then paste it on the cell infront of cell (containing google search link)

  • @aquinox77
    @aquinox77 Рік тому

    How to optimize it so it only calls some parts of the data at a particular time? (too many calls stops data from loading)

  • @rbendzsuk
    @rbendzsuk 3 роки тому

    How do you auto-update data on your Sheets with data that changes on a web site like a crypto currencies on or stock??

  • @brunocesar2283
    @brunocesar2283 4 роки тому

    Is it possible to use the importdata function to bring an account's contact data?

  • @nssdesigns
    @nssdesigns 4 роки тому

    So if you add a new video and refresh or open the Google Spreadsheet it will automatically propagate the Sheet with additional data?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      Generally yes, but it will not work on UA-cam anymore.

  • @richardlynch1139
    @richardlynch1139 7 років тому

    Good tutorial. Do you know if sites block Google sheets user agent? (Or IP or whatever it makes request under). We're trying to watch our products on Wayfair.com. "Import Internal Error" returned, but since I'm just learning can't tell if its my syntax (checks out in Firebug) or if site is blocking. Thanks!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  7 років тому

      I don't really know, I don't use Google Sheets for any serious web crawling, there are far better options. That being said, most of large website will have some some sort of request limit after which they will temporarily block the IP address. Not sure they would block Google Sheets as a whole, but it's definitely not difficult, since Sheets request IP addresses are made publicly available in Google Sheets documentation.

  • @Yadavphotographyweb
    @Yadavphotographyweb 6 років тому

    Thanks for the lesson. By this code,only first 30 data is extracted.how to extract more number of data.? By customizing this code.

  • @tylercroskey2462
    @tylercroskey2462 3 роки тому

    Does anyone know if import XML can be used for any website? I have been trying to get data from Terapeak product research and it won't even allow me to extract a title from the website. It keeps saying imported content is empty. Thanks!

  • @SquaredbyX
    @SquaredbyX 4 роки тому

    Why //ul/li instead of just //li? // uses recursive descent, which finds every tag in the document. //ul/li checks every ul in the document for a direct child li. Why not just start at //li??? and have the check start at every li tag in the document?... What are the guidelines on how far out to begin your query?

  • @bmr9779
    @bmr9779 2 роки тому

    How do you import a table when the table on the website changes by criteria(#example the websites table can change data of nba players stats from last 5 games to season long)?

  • @mvgiugni65
    @mvgiugni65 2 роки тому

    What about there is another page and you have to ask the webpage to go next page, to collect the rest of it?

  • @dcgtk
    @dcgtk 7 років тому +3

    28:55 contains attribute
    31:10 SPLIT

  • @timothyrayner3626
    @timothyrayner3626 3 роки тому

    Link to the microsoft reference you used would be useful