Intro To Web Crawlers & Scraping With Scrapy

Поделиться
HTML-код
  • Опубликовано: 2 фев 2025

Комментарии • 236

  • @PythonLearningChannel
    @PythonLearningChannel 5 лет назад +9

    I did a little web scraping a while back-- this video is very timely because I was going to get back to it!! I needed a refresher, thank you!!!

    • @PythonLearningChannel
      @PythonLearningChannel 5 лет назад +1

      @@Tolrias Good to know, thank you!!

    • @swappy3010
      @swappy3010 5 лет назад

      @@Tolrias thanks. I wanted to know this. Also could you link me to python scraping with headless chrome tutorial? A blog is also fine

  • @muhammedozen2699
    @muhammedozen2699 3 года назад +11

    Awesome video. I never thought I'd learn this much in 30 mins. Every second of video is full of useful information. Thank you so much

  • @RameenFallschirmjager
    @RameenFallschirmjager 5 лет назад +1

    Right now I'm learning Bootstrap from your udemy bootstrap course. Man, it's amazing! it's not just videos or slides, it has a very comprehensive code examples which accompanies whatever Brad says in the video. Brad did a hell of a job in this course! It's wonderful! I highly recommend it. I've not tried other brad's udemy courses, but if they are as half good as his bootstrap course, I'm sold! This man is a god among us! Love you brad, the great instructor and the awesome family man! God bless you and your family.

  • @rangabharath4253
    @rangabharath4253 5 лет назад +13

    Thank you so much brad. I purchased the Django course on udemy. Awesome content. Congratulations. U will soon reach 1M subscribers. Wow.

  • @AmDsus2Fmaj7Am
    @AmDsus2Fmaj7Am 4 года назад +8

    Let's scrape ... the scraping blog! I had a good laugh. Your courses are amazing and every now and then we get a good laugh. Keep up the excellent work.

  • @tomasjsierra
    @tomasjsierra 2 года назад

    man after watching this video and executing this video in just one morning I managed to crawl an entire website in seconds. Thank you!!!!

  • @asenchekov
    @asenchekov 5 лет назад +115

    I was just looking what a crawler is some hours ago.
    Now logging in to see this uploaded an hour ago!
    Are you reading the minds of your subscribers? :)

    • @leonardol8158
      @leonardol8158 5 лет назад +4

      YEAH, ME TOO. What a coincidence!

    • @DennisIvy
      @DennisIvy 5 лет назад +2

      A great content creator that knows what people want. Brads a legend :)

    • @abj136
      @abj136 5 лет назад +4

      No no, he's projecting his thoughts into your mind.

    • @DennisIvy
      @DennisIvy 5 лет назад +1

      abj freakin brad get out of our heads lol.

    • @TraversyMedia
      @TraversyMedia  5 лет назад +20

      😊 maybe, i do hear that a lot

  • @maxwellmuhanda7940
    @maxwellmuhanda7940 Год назад

    I was following along with a different site I needed to scap all made sense still always grateful Brad

  • @ngsuraj
    @ngsuraj 5 лет назад +1

    I have use scrapy for many web crawling and web scraping projects. However, I still found this tutorial very handy.

  • @aneriemmanuel7243
    @aneriemmanuel7243 5 лет назад +1

    This video couldn't have come at a better time... Thanks a bunch Brad... God bless

  • @tayebsaadi
    @tayebsaadi 2 года назад

    Thank you for the instructions, I like how the last minutes made things clear for me...

  • @dev_apostle
    @dev_apostle 4 года назад

    great lesson. After doing some webscraping with selenium, this finally made a lot of sense because I was lost a month ago

  • @justinmean7370
    @justinmean7370 4 года назад +1

    It's a little out of my league since I am only a beginner coder but it was utterly fascinating! Thank you very much!

  • @simonetruglia
    @simonetruglia 4 года назад +4

    thank you so much. My first time with Scrapy and you've been really clear. Great video. Tranks mate :)

  • @ericbeard7007
    @ericbeard7007 4 года назад +5

    Your videos always great.
    A lot of other coding vids built on python talk about simple math for 8 hours and I learn nothing.

  • @tyrrelldavis9919
    @tyrrelldavis9919 5 лет назад

    Bro ur the best, I hate my life but these vids help make it better.
    I do IT and dev because I like it
    and because I don't have anything/anyone else for me.
    Thenk u for helping me learn,
    Been into python and C# lately, as I re visit JS, it only strengthens my skills, after thinking in New paradigms

  • @whasuklee
    @whasuklee 5 лет назад +7

    Love your series! Thank you always!

  • @quentincaldway
    @quentincaldway 4 года назад

    Ridiculously awesome video! Def an amazing teaching and great start to web scraping with scrapy. Dope Stuff!

  • @bassirpechaz
    @bassirpechaz 3 года назад

    thanks for your comprehensive description. i think this is good as start point.

  • @RahulT-oy1br
    @RahulT-oy1br 4 года назад +2

    Thank you very much for this tutorial! It's nice, short and crisp!

  • @georgestatefield
    @georgestatefield 5 лет назад +3

    Such an awesome tutorial, sir!

  • @xzl20212
    @xzl20212 4 года назад +6

    for code 'page = response.url.split('/')[-1]'. I thought it should be page = response.url.split('/')[-2] and it works for me. But I donot know why it works with 'page = response.url.split('/')[-1]' in the vedio.

  • @robpatty1811
    @robpatty1811 2 года назад

    Great video, both compressive and concise!

  • @dzenish.2262
    @dzenish.2262 5 лет назад +7

    Like => Add to Watch later => Thanks, Brad. :)

  • @ProfessorHoffman
    @ProfessorHoffman 4 года назад

    Great tutorial, the copy XPath from the browser was very handy

  • @furqanamjad90
    @furqanamjad90 5 лет назад +6

    I see Brad's Video I click it even though I don't know what's going on :P . Like it anyways.

    • @TraversyMedia
      @TraversyMedia  5 лет назад +1

      MeGaZ haha, thanks I appreciate that ❤️

  • @AlessandroBottoni
    @AlessandroBottoni 4 года назад

    Excellent tutorial, as usual. Kudos!

  • @bordieit2874
    @bordieit2874 5 лет назад

    Very good, please keep doing this tutorial series :)

  • @themovielookout
    @themovielookout 5 лет назад +1

    Glad to be here

  • @_____-ze5ow
    @_____-ze5ow 5 лет назад

    I dont search for this but i am kind of like to watch this so thank you

  • @codewithnacho
    @codewithnacho 4 года назад

    This is sooooo cool! Thanks a lot Brad!

  • @emberprime9696
    @emberprime9696 4 года назад

    This is a great Tutorial for crawling data

  • @johnfaulkner5946
    @johnfaulkner5946 3 года назад +2

    great tutorial, but Im having trouble following along. filename='posts-%s.html' % page fails to number the pages so i just get post-.html and it overwrites itself for page 2, i assume. also tried filename = 'posts-{}.html'.format(page) with no joy.

    • @bentraje
      @bentraje 3 года назад +1

      I have the same issue. Did you managed to solve it?

    • @AdamEfrati
      @AdamEfrati 3 года назад

      @@bentraje I have the same issue, were you able to solve it? is it related to kite?
      EDIT:
      Found the problem, you need to replace this line
      OLD: "def parse(self, response):" with this one
      NEW: "def parse(self, response, **kwargs)"

    • @bentraje
      @bentraje 3 года назад +1

      @@AdamEfrati ah gotcha. didn't solve it. thanks for the reply!

  • @michelphilippenko2581
    @michelphilippenko2581 4 года назад

    Very clear explanations :-) Thanks a lot !

  • @ahmadhaidar719
    @ahmadhaidar719 2 года назад

    very useful video super educative and clear

  • @dostontoshpulatov4043
    @dostontoshpulatov4043 4 года назад +1

    Great Video simple explanation Thank you

  • @mahinkhankishizade804
    @mahinkhankishizade804 3 года назад

    You are literally the best

  • @tomershechner
    @tomershechner 5 лет назад +1

    In 8:04, why not use an f-string instead of the old percent sign way?

  • @dean6046
    @dean6046 5 лет назад +1

    Awesome! Thank you Brad!

  • @cooller8888
    @cooller8888 3 года назад

    thx for this one, helped me a lot

  • @salimel8802
    @salimel8802 5 лет назад +5

    Hello brad ! Please could you tell me when would yould you share the front end course for the devBootcamp backend on udemy?

    • @TraversyMedia
      @TraversyMedia  5 лет назад +7

      After my next course (20 vanilla Projects) which will be released within 25 days or so. I will start working on it

    • @chriscastor8328
      @chriscastor8328 5 лет назад

      @@TraversyMedia Looking forward to them both. Have a phone screen with Amazon coming up and was really worried about my lack of experience with vanilla stuff. What great timing!

  • @sdwaltersumajit2138
    @sdwaltersumajit2138 2 года назад

    Thank you for sharing the knowledge.

  • @alexsandroaugusto5722
    @alexsandroaugusto5722 4 года назад

    Your video is best, thank you help me a lot!

  • @robihamdani5385
    @robihamdani5385 5 лет назад +1

    how are you know my thought. i looking for web scrapper and you make a tutorial with this ? are you an alien brad

  • @mdjasim3722
    @mdjasim3722 5 лет назад +2

    Hey brad m still waiting for your new vanilla javascript course can you tell us when it will available in udemy???

  • @XiagraBalls
    @XiagraBalls 5 лет назад

    Nice and I know you've said there's lots more you could do with this, but one obvious improvement you could make to this is to collect an array or a set of URLs as you go to ensure you don't crawl the same page more than once - as I think that's what this code might end up doing, as it is right now. Right?

  • @chandlerbing8164
    @chandlerbing8164 5 лет назад

    you're really doing good job ... keep it up buddy... joey says

  • @Chandasouk
    @Chandasouk 5 лет назад +4

    I love me some scraping but I did it with puppeteer and something else for work. My custom API did get blocked a few months later though...

  • @RodneYSSantamarina
    @RodneYSSantamarina 5 лет назад +2

    This is great content @Brad, would it be possible for you to explain some basic topics of SEO, I feel as engineers we often lack those skills, right now I am going through the pain. Again very grateful for every piece of content you put out there.

  • @abdullahalkurdi6845
    @abdullahalkurdi6845 5 лет назад +1

    Scrapping with js, just in the perfect time for me

    • @abdullahalkurdi6845
      @abdullahalkurdi6845 5 лет назад

      Thank you brad

    • @Booyamakashi
      @Booyamakashi 5 лет назад +1

      You clearly watched the video if you think its in js.

    • @abdullahalkurdi6845
      @abdullahalkurdi6845 5 лет назад

      Booyamakashi I hadn’t watched the video by the time I commented, I honestly would’ve loved it more if it was a JavaScript, I still like the video as long as brad made it.

    • @utopictown
      @utopictown 5 лет назад +2

      scrapy is python lib lol

    • @abdullahalkurdi6845
      @abdullahalkurdi6845 5 лет назад

      neesyler you’re right, scrapy and beautiful soup are python, puppter is JS

  • @andig97
    @andig97 5 лет назад

    Hey man, pls do a course on setting up a bespoke MVC system from scratch with express server , node etc.. going over the MVC fundamentals etc.

  • @goldenmamba4839
    @goldenmamba4839 5 лет назад +1

    What about pages that are secured with middleware can you scrap them aswell?

  • @magicmystery4211
    @magicmystery4211 5 лет назад

    I haven't found any better videos for data structure & algorithm. If you know something please make a vid about it.

  • @sujalkhatiwada3572
    @sujalkhatiwada3572 5 лет назад

    Wow! It would be great if you make JIRA course and Agile development, Love all your courses here in udemy, keep going sir.

    • @nathanlewis42
      @nathanlewis42 5 лет назад

      sujal khatiwada you don’t need a course in Jira. If you don’t know it you are in some ways lucky.

    • @sujalkhatiwada3572
      @sujalkhatiwada3572 5 лет назад

      @@nathanlewis42 but why, JIRA is used in industry

  • @diegocobian8982
    @diegocobian8982 2 года назад

    thank you
    one question
    why is necessary to create a virtual env?

  • @thecardtrickstudent3870
    @thecardtrickstudent3870 3 года назад

    I'm confused regarding why sometimes we specify the attribute name (div) and sometimes we don't while selecting by class. For example:
    13:54: No 'div' keyword
    18:16: There is 'div' keyword

    • @nowieszco868
      @nowieszco868 3 года назад

      The o ly difference is that when we don't select with div, all elements with class will be selected, when we write with div, we gonna select the elements with class, that are divs only. With sayi g with div, you're more specified.

    • @thecardtrickstudent3870
      @thecardtrickstudent3870 3 года назад

      @@nowieszco868 oh oh I see. Thank you for explaining :)

  • @josemadarieta3
    @josemadarieta3 5 лет назад +2

    so weird that i just started looking at scrapy this morning and boom... this vid drops. question - i cant seem to get vs studio to launch the debugger for a scrapy file. any secrets? thx

    • @andig97
      @andig97 5 лет назад

      have you tried turning it off and on again?

  • @azamatshaimyerdyen6037
    @azamatshaimyerdyen6037 4 года назад +1

    Love your tutorial man. Thank you. With scrapy can we scrape millions of data with sequenced/scheduled interval to not get blacklisted and keep updating out file?

  • @slickgordash
    @slickgordash 2 года назад

    I'm getting an Unknown command: crawl error which is at 8:49 into the video. I can;t seem to find the error.
    Any help here?

  • @dev_apostle
    @dev_apostle 4 года назад

    wish you did a whole series on this

  • @mohsin-ashraf
    @mohsin-ashraf 5 лет назад +1

    Can we also take the user input for the url to scrape in scrapy?

  • @MikeNugget
    @MikeNugget 5 лет назад +3

    Next video: How to overcome captcha with Scrapy :)

  • @Mladen27
    @Mladen27 4 года назад

    Can you please explain why you used yield on lines 13 and 21 for final version of code? Does this mean parse is generator function in this case? How does this work under the hood?

  • @paulshop5580
    @paulshop5580 4 года назад

    I cant seem to make this code work on Python IDLE. upto 22:24 and it gives me the output on scrapy shell but cant make it work in Python IDLE 3.8.2 please help.

  • @alphabeta448
    @alphabeta448 5 лет назад

    Hi Brad, thanks for the video. Is Scrapy also able to handle SPAs and specifically with content that is dynamically generated with Javascript?

  • @JR-pk1fr
    @JR-pk1fr 4 года назад

    Very helpful, thank you.

  • @hayathbasha4519
    @hayathbasha4519 3 года назад

    Hi,
    Please advice me on how to improve / speed up the scrapy process

  • @ethanyoung8971
    @ethanyoung8971 4 года назад

    I'm stuck at 24:50. I run the program and no data returns, and no errors, either.

  • @residentjoker
    @residentjoker 5 лет назад

    I may be mistaken but I believe there is already a default method named "parse" that is overwritten here. Nothing wrong with overwriting it but it could cause unexpected behavior for someone that doesn't know.

  • @rishabhkothari1763
    @rishabhkothari1763 3 года назад +1

    Can Someone Help me I am getting two exception errors while putting the command Scrapy crawl posts:
    1)KeyError :posts
    2)Spider not Found in Posts
    Thank you in Advance! (Any Help Appreciated)

    • @Vincent.Esders
      @Vincent.Esders 3 года назад +1

      Sorry I have the same problem

    • @rishabhkothari1763
      @rishabhkothari1763 3 года назад +1

      @@Vincent.Esders Hey! If you get any Solution, please notify me here in the comment box. Would Really Appreciate the help!

    • @madsfynbobergnielsen3310
      @madsfynbobergnielsen3310 3 года назад

      @@rishabhkothari1763 sounds like you are making it search the wrong place. are you sure you are set rightfully up with your virtual environment? try going to 'debug configuration' and change the 'source path', e.g. make the last path equal to PostsSpider.py. then it should be able to find the spider. Hope it helps :)

  • @josueanyosagalvez5371
    @josueanyosagalvez5371 4 года назад +1

    4:38 When I type 'import scrapy' I get the message 'unresolved import 'scrapy'Python(unresolved-import)' I am using vscode

    • @josueanyosagalvez5371
      @josueanyosagalvez5371 4 года назад +2

      This solved the issue:
      www.reddit.com/r/learnpython/comments/a97p09/unresolved_import_warning_vscode/

  • @trinimafia001
    @trinimafia001 5 лет назад +1

    Is it possible to code this normally like in pycharm or sublime without using a virtual environment?

    • @aarongonzales3765
      @aarongonzales3765 5 лет назад

      I think PyCharm automatically creates a venv for your projects..

    • @trinimafia001
      @trinimafia001 5 лет назад

      @@aarongonzales3765 whenever i try to code this in pycharm i run into issues

    • @aarongonzales3765
      @aarongonzales3765 5 лет назад

      @@trinimafia001 Something like package not found? If so, that is easy to fix.

  • @niteshsethi4091
    @niteshsethi4091 5 лет назад +1

    Can you make a scrapping tutorial in js? There, maybe, so many persons who are looking for web scrapping tutorials in javascript.

  • @zeneto2157
    @zeneto2157 4 года назад

    I have 2 dozens of sites with jobs in europe. I would like to crawl and scrapp several data sets from it. Is there a way to do this in a generic matter to get it all at once ?

  • @pwchan7443
    @pwchan7443 4 года назад

    How about if I have multiple keywords, for instance, “123”, “apple”, orange” or even with date time, can I use these before crawling it?

  • @digigoliath
    @digigoliath 5 лет назад

    Lovely project!!

  • @robinc.6791
    @robinc.6791 2 года назад

    Hello! I want to do some web scraping but to find info on a certain thing. So normally, I would use a search engine to find the urls then from there, find the data I need. How would I automate the process of obtaining the URLS? The websites are pretty much the same ( I only really end up using 4 or 5 five websites with the data being a specific spot on the site).
    I would really appreciate any suggestions! Web scraping is such a good tool, but I need to automate the URL gathering process to accompany the Web scraping

  • @waseembarcha6816
    @waseembarcha6816 5 лет назад +2

    Is there any upcoming course for Vue with TypeScript?

    • @VladSuperKat
      @VladSuperKat 4 года назад

      ruclips.net/video/TGW-z1bIWyg/видео.html

    • @VladSuperKat
      @VladSuperKat 4 года назад

      ruclips.net/video/Ww57lUS9dF4/видео.html

  • @subsoho
    @subsoho 4 года назад

    Nice video man !
    which extension do you use to see scrapy help in vscode ?

  • @umerimran3833
    @umerimran3833 2 года назад

    Sir I have watched the while series but I got one question how to bypass 423 status code as the user agent and proxy pool isn't working

  • @Kngdmio
    @Kngdmio 5 лет назад

    This is great. Any plans for a Python video that calls an external API and fills models?

  • @taimoor722
    @taimoor722 4 года назад

    do u have its course ?? or playlist where are other scrapy videos

  • @AbdullahRady
    @AbdullahRady 4 года назад

    you're the man!!

  • @gradientO
    @gradientO 5 лет назад +1

    Can you do a video about *unit testing* ? Please

  • @coder4life
    @coder4life 5 лет назад

    Great video

  • @dietermitplatten
    @dietermitplatten 4 года назад

    8:41 I don't understand how that works. He declared a starts_url array and then doesn't use it?

    • @imenkhiari261
      @imenkhiari261 4 года назад

      it is used to tell the command "scrapy crawl posts" where to get the data from. It's like the variable name that you don't used in the code but you use it in the command line.

  • @dgloria
    @dgloria 5 лет назад

    So it ends the text as it bumps into an apostrophe in regex? Congrats to the almost 1m subscribers!

  • @Expert_Muffin
    @Expert_Muffin 4 года назад

    Quick question, using xpath insead of css when generating with yeild creates in json file differently, I mean it puts all the titles first, then the dates and so on. It's a there a different sintax that I need to use?

    • @Expert_Muffin
      @Expert_Muffin 4 года назад

      For me yield doesn't do the same when is generating, is just putting all the text under a single tag for each section.

  • @jamshin6646
    @jamshin6646 4 года назад

    Hi, Is it a vscode extension to see a document at 4:57 How can I use that of 'docs'?

    • @jamshin6646
      @jamshin6646 4 года назад

      I found the answer myself;marketplace.visualstudio.com/items?itemName=kiteco.kite

  • @srijitdas2207
    @srijitdas2207 4 года назад

    cant we create a spider using genspider? or we need to do it manually.
    I want to do scrape using scrapy in jupyter lab. How can i do that?

  • @3ckortreat
    @3ckortreat 4 года назад

    i am getting error 'str' object has no attribute 'css' 19:00

  • @sivasubramanianramanathan6945
    @sivasubramanianramanathan6945 5 лет назад +1

    Hello Brad, When 20 vanilla Projects course will release.. Waiting for that.

    • @TraversyMedia
      @TraversyMedia  5 лет назад +4

      To be safe, I will say within a month. Most likely sooner though

  • @Scuurpro
    @Scuurpro 3 года назад

    My VS doesn't show any of the scrapy folders. But when I cd into my project name and do Tree it shows the folders.

  • @ricardomalla6533
    @ricardomalla6533 4 года назад

    genius my friend.

  • @darkphoenix4273
    @darkphoenix4273 4 года назад

    In vs code how do you execute the python code in the terminal. Like when he starts the for loop?

  •  4 года назад

    Thank you.. Great video.

  • @wxIyz
    @wxIyz 5 лет назад

    Nice video!

  • @xs732
    @xs732 5 лет назад +5

    Hah I was just watching Scrappy Coco.

  • @davyroger3773
    @davyroger3773 4 года назад

    What is the setup on your developer tools on chrome?

  • @U32-w7f
    @U32-w7f 4 года назад

    Also tried a scraping with a node app. I don't know why but the performance was really different from this Scrapy.