Web Scrape in Google Sheets: IMPORTXML Function (Part 2)

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 มิ.ย. 2024
  • Web Scrape in Google Sheets: IMPORTXML Function (Part 2)
    Part 1: • Web Scrape in Google S...
    In this video, we scrape Yelp, Craigslist, and TechCrunch using the importxml function in Google Sheets.
    W3 Schools Tutorial: www.w3schools.com/xml/xpath_i...
    ----------------
    Datase
    ----------------
    Craigslist: philadelphia.craigslist.org/d...
    TechCrunch: techcrunch.com/
    Yelp: www.yelp.com/search?find_desc...
    ----------------
    Timeline
    ----------------
    0:00 Intro
    0:40 Scraping Craigslist
    4:42 Scraping TechCrunch
    5:28 Scraping Yelp
    5:8:26 Summary

ความคิดเห็น • 151

  • @PhilShepardLLC
    @PhilShepardLLC 3 ปีที่แล้ว +5

    Thank you for this video! I was trying to scrape data from a website and couldn't figure it out until I came across this video.

  • @27455628
    @27455628 2 ปีที่แล้ว +11

    That tutorial is so useful and simplicit, contain no bs and full of content. You are a champ.

  • @chrisford7351
    @chrisford7351 ปีที่แล้ว

    I HAVE NEVER SEEN ANYTHING LIKE THIS IN MY LIFE. Sure, I have see screen scraping back in the old CRT days, but this is UNREAL and it's easy ONCE you know the language!! Excellent Video!

  • @PassiveIncomeGeneratorPIG
    @PassiveIncomeGeneratorPIG 3 ปีที่แล้ว +4

    More google sheet tutorial please. Thanks a bunch! 😍

  • @preyasprathap
    @preyasprathap 3 ปีที่แล้ว +1

    this channel is gold. Amazing tutorials

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      Thank you, I appreciate it!

  • @hirenkakkad3747
    @hirenkakkad3747 3 ปีที่แล้ว

    Simply Amazing. Thanks for such a wonderful video tutorials

  • @pmbdetailing
    @pmbdetailing 3 ปีที่แล้ว +2

    Pure gold, great and on point! Thanks for the content.

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      Glad you enjoyed it!

  • @lifeofpunk2294
    @lifeofpunk2294 3 ปีที่แล้ว +2

    finally I found it, absolutely amazing, thank you a lot!

  • @miketaiwanwalkcity6355
    @miketaiwanwalkcity6355 3 ปีที่แล้ว +1

    Wow! You' re a MASTER of scraping and Google Sheets! Just learned so much with 2 of your videos

    • @dataslice
      @dataslice  3 ปีที่แล้ว +2

      Thanks! I’m glad to hear it!

    • @miketaiwanwalkcity6355
      @miketaiwanwalkcity6355 3 ปีที่แล้ว +1

      @@dataslice Thank is to you! Only problem is scraping Image URL from Craiglist in your example, I added /@src but it doesn't work

  • @First.Last.99
    @First.Last.99 3 ปีที่แล้ว

    wow, what an extension! Killer! Love it

  • @autobaron1410
    @autobaron1410 3 ปีที่แล้ว

    Thanks man you really helped me out here!

  • @Yakubian
    @Yakubian 2 ปีที่แล้ว

    best tutorial ive seen, thank you

  • @Birlank
    @Birlank 3 ปีที่แล้ว

    Earned a subscriber great info, clear and concise!

  • @franciscotriano8344
    @franciscotriano8344 ปีที่แล้ว

    Thanks, great help for any webside :D

  • @TiffannyDoll
    @TiffannyDoll 2 ปีที่แล้ว

    thumbs up for the video, really useful and well explained.

  • @primasupport6071
    @primasupport6071 3 ปีที่แล้ว

    Super useful. You safe my day!

  • @TheBondy2010
    @TheBondy2010 3 ปีที่แล้ว +6

    Thanks so much for the value! For your yelp example, how would you go about trying to keep a well managed and orderly scrape of all the items across all page numbers over time? Including trying to remove duplicates as each item moves across the different pages?
    Thanks!

  • @chennasreenu4723
    @chennasreenu4723 2 ปีที่แล้ว

    Excellent video. Great content!!

  • @haaksify
    @haaksify 2 ปีที่แล้ว

    U solved my very unsolved problem - thanks alot!!

  • @techxteem8010
    @techxteem8010 3 ปีที่แล้ว

    top-notch tutorial, Thanks alot :D

  • @fabianperez3095
    @fabianperez3095 3 ปีที่แล้ว

    Absolutely amazing !!!!

  • @evanhoang5546
    @evanhoang5546 3 ปีที่แล้ว

    Great info, earned a sub 🙌

  • @ajitafhaam
    @ajitafhaam 3 ปีที่แล้ว

    Thank you mr for these useful tricks

    • @dataslice
      @dataslice  3 ปีที่แล้ว +1

      Thanks for watching!

  • @julescaruso4398
    @julescaruso4398 3 ปีที่แล้ว

    Excellent Content!

  • @MrGametop1
    @MrGametop1 ปีที่แล้ว

    Really good video :D

  • @PierinoSchiavone
    @PierinoSchiavone 3 ปีที่แล้ว +1

    Superb

  • @jknoepke11
    @jknoepke11 2 ปีที่แล้ว

    Excellent video. Curious if you could help explain if this is exclusive for text or if numerical data can be extracted as well? If so, could you help coach on how to do that? I keep struggling to get anything but the text headers in a numerical data table that is non HTML tables. Thank you!

  • @MicahJohns
    @MicahJohns 3 ปีที่แล้ว

    This video is so good it's basically a cheatsheet.

  • @sneakerman1313
    @sneakerman1313 2 ปีที่แล้ว

    Amazing content

  • @akkintouch
    @akkintouch 2 ปีที่แล้ว +3

    is it possible to get the sector from google finance / yahoo finance page for a stock, i tried but its showing me an error..

  • @raykim5422
    @raykim5422 3 ปีที่แล้ว +2

    You da real mvp

  • @Roottech25
    @Roottech25 3 ปีที่แล้ว

    nicely done...

  • @bmwe46zhp
    @bmwe46zhp 2 ปีที่แล้ว

    Thank you for your help

  • @mattchouinard9576
    @mattchouinard9576 3 ปีที่แล้ว

    You're a beast.

  • @danilosouza1161
    @danilosouza1161 หลายเดือนก่อน

    amazing..thanks

  • @satmoura12
    @satmoura12 3 ปีที่แล้ว

    thank you , useful

  • @pilotgfx
    @pilotgfx 2 ปีที่แล้ว

    would love to hear how you would go ahead scraping dynamic pages that loads the content through java / api? I have some different solutions available: Scrapy, Octoparse, Selenium(Python), Java, or somehow retrieving it directly from the API. Could i do it with GraphQL? I need the data to get fed into a cell in a google sheets, i prefer not having to manually load it from a csv. i'm okay at sheets but not python/java

  • @PykeGriffin
    @PykeGriffin 2 ปีที่แล้ว

    Hello thanks for the awesome tutorial, however, how do you do this with a webpage you have to log in to get table info?

  • @mikelatragna9659
    @mikelatragna9659 2 ปีที่แล้ว

    This is AWESOME! Do you know if this is possible to do with a site that requires a login?

  • @sophieshen6054
    @sophieshen6054 2 ปีที่แล้ว

    this is so helpful! is it possible to use this method to get the links in the page?

  • @kondor7
    @kondor7 3 ปีที่แล้ว +5

    I'm encountering an issue at 4:09 for the //p[@class='result-info'] , as I got a #N/A as a result.
    The class name on CraigList is not changed yet, so can't figure out why this isn't working as you.
    Thanks for your help and your videos.
    EDIT :
    #2 On TechCrunch website, I'm not able to click on "XPath" Button. It's not working at all. Otherswebsite are fine tho. Do you have any idea why ?
    #3 On Yelp website , the result for the first example in Sheets is CSS code. Far from what you get even if I'm doing the exact same thing.
    Your video isn't so old, I really can't figure out why thinks works so differently , I tried to re-watch many times your video to see if I'm missing something but no.... ;(

  • @innerresonance6682
    @innerresonance6682 3 ปีที่แล้ว +2

    Great content!!
    I'm trying to scrape an Amazon list of Item Names & Prices but it will only return a list of 10 of the items... 🤷‍♂️

  • @paulmoon7421
    @paulmoon7421 2 ปีที่แล้ว

    thank you for the quality tutorial. i'm looking for a way to scrape data from SSRS to google sheet. is this possible? thanks

  • @demo7191
    @demo7191 3 ปีที่แล้ว

    Thanks for the awesome video! But how to find the right xpath from youtube? I try SelectGaghets extention, but he gives me a Error:
    Imported Xml content can not be parsed. Or Error
    "Imported content is empty" only "//a" xpath works for me...

  • @eloisehitalia4649
    @eloisehitalia4649 3 ปีที่แล้ว

    I'm having a hard time scraping data from skybox. hopefully this helps

  • @Summersolstice1826
    @Summersolstice1826 5 หลายเดือนก่อน

    Can we use importxml function directly without using or downloading application or software to scrape data from any website?

  • @nordicnugz
    @nordicnugz ปีที่แล้ว

    Is it possible to have google sheets pull information from Search Engine results? For example, enter a business name, and it searches Google and pulls info for that company?

  • @lheedp
    @lheedp 7 หลายเดือนก่อน

    If the page gets updated. The info on the Sheet will get updated as well?

  • @victorkoetter4882
    @victorkoetter4882 2 ปีที่แล้ว +1

    Great tutorial! When I scraped data from a website the data was only scraped until a certain point, even though more yellow containers were highlighted. What is the issue here, does the scraping stop after a certain number of lines?

    • @kevinttyrrekk
      @kevinttyrrekk ปีที่แล้ว

      Victor. Same problem I am having. @dataslice can you comment?

  • @MrAJ-xx9gh
    @MrAJ-xx9gh 2 ปีที่แล้ว

    Hi, how many data row is it limited for importxml function?

  • @TruthDefenderPodcast
    @TruthDefenderPodcast ปีที่แล้ว

    How would this work (if at all) in youtube trying to scrape video data? Especially when it comes to tracking down the actual video ID and not the vanity URL? THANKS IN ADVANCE

  • @annowwi
    @annowwi 2 ปีที่แล้ว

    Thank you so much for these tutorials! I think i'll use them in future. Not now, because.. i need to import comments from instagram, and...is there any way to do that? I guess insta won't let google sheet take data from it because it's not "logged in", and..yea.. i would love to hear any answers for it, even if that's a no :")

  • @powergaming-tu6wj
    @powergaming-tu6wj 2 ปีที่แล้ว

    is there a way to automatically change the url. lets say like a item id at the end or the url to make a database?

  • @UbbeGubbn
    @UbbeGubbn 2 ปีที่แล้ว

    Thanks for a great video on this subject! But this does not work for me. I get an "error" when try to input the second field in this example!

  • @memossjr
    @memossjr 3 ปีที่แล้ว

    Can we use importxml to extract photos to Google Sheets? If so, what is the process?

  • @gappi9939
    @gappi9939 ปีที่แล้ว

    Tell me the extension that is using for select all links in one time

  • @tim64163
    @tim64163 2 ปีที่แล้ว

    Do you know if it's possible to tell Google sheet to scrap data from a specific location? I tried using those commands, but it was sending me data from United States whilst the page update automatically depending on the country you're accessing it from, though the URL remains the same.

  • @PEEYUSHKP
    @PEEYUSHKP 3 ปีที่แล้ว +1

    importxml function is not working in google sheets. It is showing NA when trying import the data
    Can you suggest a solution

  • @rashidrazak4796
    @rashidrazak4796 3 หลายเดือนก่อน

    How to make it auto update/refresh result? Can i just Reload the google sheet tab

  • @johnhe9984
    @johnhe9984 2 ปีที่แล้ว

    How is scrape pictures from Craigslist? Is there a way to scrape desired data from balance sheet from yahoo finance into google sheets?

  • @yusufaqel3299
    @yusufaqel3299 3 ปีที่แล้ว

    hi there can you help me how to collect data from 'BURSA'?. such as stock price and so on. i already tried all the methods but it did not work

  • @shoechoose2291
    @shoechoose2291 2 ปีที่แล้ว +1

    Hello
    Thank you very very much for this excellent video that is very very helpful
    Just a question : if I need to scrap the image URL of the product, is there a way to do it ?
    Thank you

    • @leonvla
      @leonvla 2 ปีที่แล้ว

      hey, i am having the same question. have you found out the solution?

  • @cgc2300
    @cgc2300 6 หลายเดือนก่อน

    Hello I am an Amazon seller, do you think I could use this technique to retrieve my sales history directly in a Google sheet?

  • @Adil-tb8xo
    @Adil-tb8xo 2 ปีที่แล้ว

    How do you use this function to scrape hyperlinks in the website?

  • @chrismelville8565
    @chrismelville8565 3 ปีที่แล้ว +1

    Love it thanks for sharing! Do you have one on python by chance? I saw the one on R but am curious if you do anything with python.

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      I’m working on a python one now - thanks for watching!

    • @chrismelville8565
      @chrismelville8565 3 ปีที่แล้ว

      @@dataslice Can't wait! These are awesome!!

  • @lahore-drone-views
    @lahore-drone-views 2 ปีที่แล้ว +1

    Can i do the same on password protected site

  • @savyasachiarora5647
    @savyasachiarora5647 2 ปีที่แล้ว

    how to extract data from multiple pages on yelp ? not just the first one

  • @ingilizanahtar644
    @ingilizanahtar644 3 ปีที่แล้ว

    thanks

  • @thetravelservice1235
    @thetravelservice1235 ปีที่แล้ว

    can you please guide me how to scrape skyscanner and kayak Best price in google sheet.

  • @bradgentle354
    @bradgentle354 3 ปีที่แล้ว

    Hey mate! Great tute. Any idea how to get the info beyond a "More" button using these methods?

    • @bradgentle354
      @bradgentle354 3 ปีที่แล้ว

      Taking the Craig's List one for example, If you wanted to see the top 300 results, if they were beyond a more button that loaded onto the current page and not on a "page=2" type thing.

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      Hey Brad, unfortunately if you want to do any kind of UI interaction on the page, you'll need to use a different web scraping method--something like the Chrome web scraper extension or the Selenium library in R or python.

  • @tazulislam2698
    @tazulislam2698 3 ปีที่แล้ว

    How to import the tables that filled with api data?

  • @bryanl5833
    @bryanl5833 3 ปีที่แล้ว

    Tried doing this for rental units to find but just kept getting an error sadly

  • @David-mk4it
    @David-mk4it 10 หลายเดือนก่อน

    I tried exactly the same workflow as you but mine is giving me error. it's craiglist with home rental site.

  • @timothytan6265
    @timothytan6265 3 ปีที่แล้ว +1

    Hey Thank you for the video!
    Do you know to get the updated data.
    Example if i am importing a stock price.
    and i would like to import the updated data after 30 mins.

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      I can't think of a way other than manually refreshing the formula and cells, however, I do know that Excel supports getting data from stock tickers. You can write a ticker name in a cell, like $AAPL, and then go to the 'data' to format it as a stock ticker, and then fetch a lot of different data points about the stock -- it might be easier than scraping it!

  • @learningstuff5679
    @learningstuff5679 3 ปีที่แล้ว

    How come this only works for certain website? Eg. When I try to do this on a real estate website or supermarket website i always get the error #N/A?

  • @Meowest21
    @Meowest21 2 ปีที่แล้ว

    Will this update daily?

  • @pddea8254
    @pddea8254 2 ปีที่แล้ว

    How if we collect data from website with basic auth to spreadsheet

  • @MuhammadFAH33M
    @MuhammadFAH33M หลายเดือนก่อน

    Clear Explanation 👍
    Questions
    Will the important HTML Is up-to-date data from the source website? If no then please tell us a way to keep a live data
    2- I want to scrap ecommerce website product data, how to auto scrap Next page ?
    3- How about import data via json file url most e-commerce website uses it eg Shopify
    I'll be thankful if you please create an ecommerce website data scraping vidoe or share your tips so ill give it a try 🙂

  • @ckanu8689
    @ckanu8689 ปีที่แล้ว

    Can you import the images?

  • @mathiasvestergaard1740
    @mathiasvestergaard1740 2 ปีที่แล้ว

    The =IMPORTXML(B2,B3) isent working for me, the numbers just go grey . Anyway to fix this??

  • @TJG4381
    @TJG4381 2 ปีที่แล้ว

    How do you scrape data from a website that is behind a paywall?

  • @austinmudd6372
    @austinmudd6372 3 ปีที่แล้ว

    SelectorGadget doesn't have an icon to click to activate after i Installed on chrome. Is there a Firefox equivalent?
    Also, how would you recommend scrapping home data from Redfin/Zillow? I would like to paste in links and automatically fill in home data row by row for different homes. For the SF for example, i tried used //div[@class='info-block sqft'] but it doesn't work (shows N/A)

    • @OrozcoJr.
      @OrozcoJr. 3 ปีที่แล้ว

      Mine worked fine..

  • @arnniemartinmarasigan1297
    @arnniemartinmarasigan1297 10 หลายเดือนก่อน

    what did you do to show the xpath??? you did not teach how to show this xpath in your video

  • @GZbautista
    @GZbautista 3 ปีที่แล้ว

    I just tried this trying to scrape google play store and failed. is this possible to scrape google play store reviews? please help

  • @PEEYUSHKP
    @PEEYUSHKP 3 ปีที่แล้ว

    I was trying to export data from scopus.com webpage

  • @dimitrioschantzis4647
    @dimitrioschantzis4647 3 ปีที่แล้ว +4

    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

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      If nothing is changing, I’m not sure what the issue would be unless there’s an error getting data from the site. What site is it?

    • @dimitrioschantzis4647
      @dimitrioschantzis4647 3 ปีที่แล้ว +1

      @@dataslice I did it through a script and it works. I was told that it was probably the speed of the network. Thanks a lot again

  • @divakar.mycroft
    @divakar.mycroft 3 ปีที่แล้ว

    Is this data updated automatically?

  • @erikaknollenberg7526
    @erikaknollenberg7526 2 ปีที่แล้ว +1

    What if I want to scrape all of the images and their respective alt text or all of the h tags in order of their appearance on the page?

    • @leonvla
      @leonvla 2 ปีที่แล้ว

      hey, i am having the same question. have you found out the solution?

  • @eclipse1161
    @eclipse1161 2 ปีที่แล้ว

    hey man, having trouble scraping yahoo finance onto a spreadsheet, can you help?

  • @pier-hugodian3465
    @pier-hugodian3465 3 ปีที่แล้ว

    Thanks for this great tuto. when i'm trying to use on a realtor listing, google sheet result is "N/A", what did i make wrong ? thanks

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      Which site are you trying to scrape? Websites where the data is loaded dynamically sometimes don't cooperate with Google Sheets / other webscrapers and you may need a different approach

    • @demo7191
      @demo7191 3 ปีที่แล้ว

      Same problem... I'm trying to scrape youtube.com. I'm watched this video th-cam.com/video/pwZ44kAeiOo/w-d-xo.html&t where he scrape youtube with no effort, but right know it's seems it no working any more...

  • @geesande6409
    @geesande6409 ปีที่แล้ว

    Does this work with Microsoft Edge? Do you have discord server? I wanna ask something. :)

  • @learningstuff5679
    @learningstuff5679 2 ปีที่แล้ว +1

    I still get #N/A ??? It worked for Craigslist but not for other sites i tried like Supermarkets?????

  • @AdamLundquist
    @AdamLundquist 2 ปีที่แล้ว

    How would you do this with links

  • @Maxparata
    @Maxparata หลายเดือนก่อน

    How can I get the URL link?

  • @juanmaguevara
    @juanmaguevara 3 ปีที่แล้ว +1

    Great content! How can i convert the info from text to numbers? (e.g. prices list)

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      Thanks! Maybe try the Format > Number tab for formatting an entire column

    • @juanmaguevara
      @juanmaguevara 3 ปีที่แล้ว

      @@dataslice I tried, but it's impossible

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      @@juanmaguevara That's very odd, I'm able to format my scraped columns and am trying to think of why it wouldn't work for you. Maybe the scraped text data contains non numeric values and Sheets is unable to format it? I'm not too sure

    • @victorruiz804
      @victorruiz804 2 ปีที่แล้ว +1

      Maybe I'm too late, and maybe it's a dumb answer, but in some cases works for me adding 0 to the text to convert it into numbers, if the text is just numeric

    • @juanmaguevara
      @juanmaguevara 2 ปีที่แล้ว

      @@victorruiz804 thanks Victor!

  • @chanchalshaw6178
    @chanchalshaw6178 ปีที่แล้ว

    How to get data in Google Sheet from a website after login?

  • @feliperoletto
    @feliperoletto ปีที่แล้ว

    Señor, usted SAPE.

  • @quangvu9233
    @quangvu9233 3 ปีที่แล้ว

    Can you make a video about importing data from fb messenger into R ? I tried selector gadget but it didnt work . Thank you for those amazing tricks

    • @dataslice
      @dataslice  3 ปีที่แล้ว +1

      Facebook actually lets you export and download your messenger data, I’d recommend trying that!

    • @quangvu9233
      @quangvu9233 3 ปีที่แล้ว

      @@dataslice yes but the file is in json or html format, and i dont know how to tràner them into csv

  • @peterhansen1351
    @peterhansen1351 3 ปีที่แล้ว

    Is there a way to import the anchor tag instead of the URL when using //a/@href?

    • @dataslice
      @dataslice  3 ปีที่แล้ว

      Are you trying to import the text between the ... tag?

    • @peterhansen1351
      @peterhansen1351 3 ปีที่แล้ว

      @@dataslice Yes. Here is the element:
      Aldersgate United Methodist Church
      When using @href to import, it imports the hyperlink. Is there a way to import the anchor tag? Thanks

    • @peterhansen1351
      @peterhansen1351 3 ปีที่แล้ว

      @@dataslice Figured it out, was using the wrong element. Thanks

    • @dennisifemade8783
      @dennisifemade8783 ปีที่แล้ว

      @@peterhansen1351 how did you do it. I have been trying to import a similar text too

  • @AvanaVana
    @AvanaVana ปีที่แล้ว

    Regular devtools has right click on element > copy > copy xpath