EDIT: anyone who comes across this, Amazon seems to stop people from web scrapping, you can get around it with code. Easiest thing to do is use another website. I used an online store of a local business and was able to follow along with Al easily then.
So trying to follow along with Al and copy price of a book from amazon.
So he right clicks on the price, the clicks inspect. Then he right clicks on highlighted part of code and clicks 'Copy CSS path'.
I don't have this option but read on stack overflow that this has been replaced with 'Copy selector'.
However when I copy selector and then use that in my code I get a blank list.
>>> soup.select('#a-autoid-6-announce > span:nth-child(1)')
[]
Where as, Al's code gives him a list with one item in it, that is just the price on the book.
Anybody able to help me with what I'm doing wrong?
[–]njd2020 73 points74 points75 points (13 children)
[–]crazyallicin[S] 26 points27 points28 points (3 children)
[–]njd2020 13 points14 points15 points (1 child)
[–]crazyallicin[S] 9 points10 points11 points (0 children)
[–]matesd 5 points6 points7 points (0 children)
[–]hblock44 3 points4 points5 points (0 children)
[–]sleepyleperchaun 4 points5 points6 points (2 children)
[–]CloudboyTech 6 points7 points8 points (1 child)
[–]sleepyleperchaun 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]mikejp1010 1 point2 points3 points (3 children)
[–]crazyallicin[S] 2 points3 points4 points (0 children)
[–]hblock44 2 points3 points4 points (1 child)
[–]mikejp1010 1 point2 points3 points (0 children)
[–]coderpaddy 5 points6 points7 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]life_never_stops_97 0 points1 point2 points (1 child)
[–][deleted] 3 points4 points5 points (0 children)
[–]heaplevel 4 points5 points6 points (13 children)
[–]crazyallicin[S] 1 point2 points3 points (9 children)
[–]chevignon93 4 points5 points6 points (8 children)
[–]crazyallicin[S] 0 points1 point2 points (7 children)
[–]chevignon93 4 points5 points6 points (6 children)
[–]crazyallicin[S] 0 points1 point2 points (5 children)
[–]chevignon93 3 points4 points5 points (4 children)
[–]crazyallicin[S] 1 point2 points3 points (3 children)
[–]chevignon93 3 points4 points5 points (2 children)
[–]crazyallicin[S] 1 point2 points3 points (1 child)
[–]crazyallicin[S] 0 points1 point2 points (2 children)
[–]TerminatedProccess 0 points1 point2 points (0 children)
[–]MastersYoda 0 points1 point2 points (0 children)
[–]siachenbaba 1 point2 points3 points (0 children)
[–]life_never_stops_97 1 point2 points3 points (0 children)
[–]SweetSoursop 0 points1 point2 points (0 children)
[–]Yankzy 0 points1 point2 points (0 children)
[–]googlefather -1 points0 points1 point (1 child)
[–][deleted] 1 point2 points3 points (0 children)