Python Scrapy Tutorial - 10 - Extracting data w/ XPATH

  Рет қаралды 80,674

buildwithpython

buildwithpython

Күн бұрын

Пікірлер
@popi3789
@popi3789 2 жыл бұрын
This series is completely awesome, I've been dying to find a video that explained in thorough detail what everything means when you are actually using scrapy. Thanks a lot!
@kipronoelijahkoech4630
@kipronoelijahkoech4630 4 жыл бұрын
I am totally loving this. I can't have enough. I guess I will go all through everything in two days.
@buildwithpython
@buildwithpython 4 жыл бұрын
Do it.
@hritikthapa1
@hritikthapa1 4 жыл бұрын
why is the code written in the UI the same, if we can just use scrapy shell, "https.." what is the necessity of the code? or why isn't the code changing acc. to the wbesites we are scraping?
@ravitanwar9537
@ravitanwar9537 5 жыл бұрын
keep coming up with more python projects like this bro . awesome !!
@2137xd
@2137xd 4 жыл бұрын
Rias gremory tryna learn python XD
@CipherX-07
@CipherX-07 3 ай бұрын
excellent explanation.....Thank you bro
@alisiraydemir
@alisiraydemir 2 жыл бұрын
I can not go to the previous code inside the scrapy shell by using 'up' any idea why?
@zeki7540
@zeki7540 3 жыл бұрын
I can't get any response with different website, I only get "..." as scrapping result where is the problem? please help!!
@Nin3_Six
@Nin3_Six 3 жыл бұрын
how do i display the previous command in shell as you are in pycharm
@yuliu1105
@yuliu1105 5 жыл бұрын
Thank you for this scrapy video series. I did the exactly as you showed, response.xpath("//title").extract(), and I got an empty list. I also tried response.css("title").extract(), same empty list. Please advise.
@buildwithpython
@buildwithpython 5 жыл бұрын
Very difficult to debug when you don't know the website. The code looks alright.
@thatolebethe3238
@thatolebethe3238 3 жыл бұрын
Thank you for the video series
@akromajones3385
@akromajones3385 5 жыл бұрын
I have a question how do we crawl a website when two li's exist that both have hrefs but do not have a class and on the following page they change orders? Can we get the text and use : if href = mytext : request.follow??
@buildwithpython
@buildwithpython 5 жыл бұрын
Give it a shot.
@sankofax8082
@sankofax8082 5 жыл бұрын
do i still need to be checking for source codes(inspect element) to find the selectors(css or Xpath) can't i just use the chrome extension you provided. is there any added benefit of know the syntax of Xpaths. thanks for the tuts by the way. super awesome
@SchonGetestet
@SchonGetestet 5 жыл бұрын
it is important to get the class, where the url is in it. not the class of the href-tag, but the next outer
@ameygirdhari8703
@ameygirdhari8703 4 жыл бұрын
Awesome explanation
@buildwithpython
@buildwithpython 4 жыл бұрын
thanks :)
@harigopaladamus9481
@harigopaladamus9481 Жыл бұрын
very good stuff
@robertgancarczyk8710
@robertgancarczyk8710 4 жыл бұрын
I like your stuff :)
@winstonloke2860
@winstonloke2860 5 жыл бұрын
in the video you used response.css(li.next ......) to state the class for css selector. and response.xpath("//span[@class='text']...... can i say that this is the standard format for the 2 selectors when looking for class type?
@SchonGetestet
@SchonGetestet 5 жыл бұрын
I used this for a website with the following code: response.css("a.pagination-next").xpath("@href").extract() So, the classes can be different.
@angejoelziade6920
@angejoelziade6920 5 жыл бұрын
Good morning. I don't understand why i get answer like [u'Quotes to Scrape] before command response.xpath("//title/tesxt()").extract... why *"u'"*
@buildwithpython
@buildwithpython 5 жыл бұрын
I have mentioned it in the videos. u is only python information that this text is coded in Unicode. You have to print text in correct way to get it without this information
@ashutoshtiwari3785
@ashutoshtiwari3785 4 жыл бұрын
The response is in bytes. Just add ".encode{"utf-8")" after the statement you are using.
@mountainrunner1955
@mountainrunner1955 4 жыл бұрын
is it necessary to mix css and xpath? e.g. you use response.css("a").xpath("@href").extract() . Doesn't it make more sense to stay with css: response.css("a::attr(href)").extract() ? seems easier to read for me. Or have you used it only for demonstration purposes?
@fabiof.deaquino4731
@fabiof.deaquino4731 4 жыл бұрын
It was used for demonstration only, just to let us know that we can use it if want (or need) to :)
@yehiafouad6360
@yehiafouad6360 5 жыл бұрын
thanks for your exciting course it really helpful !! but I have a problem with extracting data in amazon....when I select the css using | response.css(".a-text-normal::text").extract() | the output is [] only NO DATA INSIDE IT !!....can you help me on this ?
@sankofax8082
@sankofax8082 5 жыл бұрын
use the chrome extension he provided (in the previous episode)to narrow down the elements yourself. your amazon page could be formatted differently from the one shown in the video.
@ameyabrahmankar2220
@ameyabrahmankar2220 5 жыл бұрын
I am facing the same problem
@MaryemChannel
@MaryemChannel 3 жыл бұрын
Same problem. The is due to the spaces in the class name i think there is a special method for class with spaces i tried to put . Instead of space but doesnt work
@abdulhannan1996
@abdulhannan1996 5 жыл бұрын
response.xpath("//span[@class='text']/text()").extract() this line which I copied from you gives me alot of unwanted /u characters in each sentence. Why do I get them and not you. Btw I have python 3.6.3
@HeroicHeaster
@HeroicHeaster 5 жыл бұрын
send the original xpath with '/u'
@whayAl
@whayAl 3 жыл бұрын
could you enable the subtitle for this video please? many thanks in advance for all your teachings
@Bihari_Chaman
@Bihari_Chaman 2 жыл бұрын
Use the default inspect element of Chromium
@mmanuel6874
@mmanuel6874 5 жыл бұрын
You only used it in the terminal. What about the code
@buildwithpython
@buildwithpython 5 жыл бұрын
This is a video series. Watch the next videos
@halbodb
@halbodb 3 жыл бұрын
Love your videos but unfortunately your screen casting is too small for watching! 📺😢
@dipankardey1044
@dipankardey1044 2 жыл бұрын
one observation is there. If I'm using- response.css('a').xpath('@href').extract(), I get some limited no.(441) of urls, but when I'm using response.css('a').xpath('//@href').extract() I see a lot of extraction continues. Does it scrape all the pages too in the second expression? note the "//" in the xpath
@krishankumarpandey464
@krishankumarpandey464 2 жыл бұрын
To extract next page I only used Xpath: response.xpath("//li[@class='next']/a/@href").extract()
Python Scrapy Tutorial - 11 - Web Scraping Quotes and Authors
9:48
buildwithpython
Рет қаралды 58 М.
Python Scrapy Tutorial - 9 - Extracting data w/ CSS Selectors
12:05
buildwithpython
Рет қаралды 86 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
The Biggest Mistake Beginners Make When Web Scraping
10:21
John Watson Rooney
Рет қаралды 124 М.
Scrapy for Beginners - A Complete How To Example Web Scraping Project
23:22
John Watson Rooney
Рет қаралды 282 М.
Scrape Twitter with 5 Lines of Code
6:36
Rob Mulla
Рет қаралды 76 М.
Intro To Web Crawlers & Scraping With Scrapy
28:56
Traversy Media
Рет қаралды 276 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 821 М.
Scrapy Basics - How to Get Started with Python's Web Scraping Framework
20:30
Download Images using Scrapy and Python
12:51
Code [RE] Code
Рет қаралды 14 М.
XPath Crash Course For Python Web Scraping
30:07
NeuralNine
Рет қаралды 30 М.
Scraping Data from a Real Website | Web Scraping in Python
25:23
Alex The Analyst
Рет қаралды 541 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН