Amazon Web Scraping Using Python | Data Analyst Portfolio Project
HTML-код
- Опубликовано: 23 авг 2021
- Take my Full Python Course Here: bit.ly/48O581R
Web Scraping isn't just for those fancy "programmers" and "software developers". Us analysts can use it too! In this project I walk through how to scrape data from Amazon using BeautifulSoup and Requests.
LINKS:
Code in GitHub: github.com/AlexTheAnalyst/Por...
Anaconda: www.anaconda.com/products/ind...
Find Your User-Agent: httpbin.org/get
____________________________________________
SUBSCRIBE!
Do you want to become a Data Analyst? That's what this channel is all about! My goal is to help you learn everything you need in order to start your career or even switch your career into Data Analytics. Be sure to subscribe to not miss out on any content!
____________________________________________
RESOURCES:
Coursera Courses:
Google Data Analyst Certification: coursera.pxf.io/5bBd62
Data Analysis with Python - coursera.pxf.io/BXY3Wy
IBM Data Analysis Specialization - coursera.pxf.io/AoYOdR
Tableau Data Visualization - coursera.pxf.io/MXYqaN
Udemy Courses:
Python for Data Analysis and Visualization- bit.ly/3hhX4LX
Statistics for Data Science - bit.ly/37jqDbq
SQL for Data Analysts (SSMS) - bit.ly/3fkqEij
Tableau A-Z - bit.ly/385lYvN
Please note I may earn a small commission for any purchase through these links - Thanks for supporting the channel!
____________________________________________
SUPPORT MY CHANNEL - PATREON/MERCH
Patreon Page - / alextheanalyst
Alex The Analyst Shop - teespring.com/stores/alex-the...
____________________________________________
Websites:
GitHub: github.com/AlexTheAnalyst
____________________________________________
All opinions or statements in this video are my own and do not reflect the opinion of the company I work for or have ever worked for
The real talk is nice. “It took ten hours over two weeks”. These are things people need to hear. Some people watch these videos on YT and think it is just that easy. This is why your channel is on my short list of channels I subscribed to. Thanks for all your time on these.
Hey MS Excel - sponsor this channel!
I try to make it as realistic as possible - I used to think people could do this all off the top of their heads and I would get discouraged. Glad to hear that! :D
@@AlexTheAnalyst For the same product, I couldn't find the id for price...it shows div class...what to do?
This should work if you tweak it well enough
@@pkabir4625 go little bit up you will find id but you have to use strip function and [1:4] or insert the values as per your requirement to get the exact vales. this worked for me
it didnot work for me , not showing price id ,its in span tag
it's been a year on this project and despite me searching and watching other channels, I always come back to your channel ,you are simple the best person I have learned from . you are genuine and always able to get your point across .I hope you expand your "python for data analysis" series just like you did with SQL.
Thank you so so much .
Always thank you for all your efforts and good work! I love watching your videos. Your positive attitude and way of expression make the lesson even more fun. I've seen a few people say the video is too long, but I think being able to walk through the lesson together rather than other videos that show written code is much better for learning. Thank you thank you thank you ☺
Alex is so honest and down to earth, he doesnt have that usual RUclipsr vibe that we are accustomed to. Man we're so lucky to find you as a mentor.
That means a lot! Thanks for watching! :D
@@AlexTheAnalyst hi. how to find the code you showed right of the 't-shirt' web page?..you selected price...then the code for price got selected. how to do that?
Thank you for this, Alex. I felt so happy when I finally could scrap the website I had been trying to scrap (I applied your teaching to another website). Really appreciate your work.
So great Alex! I followed along with this entire project and added it to my portfolio! I'll be sure to give you credit in my README file. :)
Hey Alex quick tip: When you were working on spaces like 34:21 if you select everything that you wanna move and press tab this way everything you choose goes 1 tab right. Little things like that improve your quality of life sometimes. Thanks for the tutorial :)
you're already doing a great job man. Thanks a ton, and hats off to you.
But,
We need that part 2. Please do it asap Alex.
The section where you speak about how you shouldn't know this by heart is so good. Honestly... I am learning SQL as per your recommendation, but in the back of my head I am scared as I think I should learn and memorize each single block of code... And this is awful... Thank you for being honest and clear on that!
How is it going?
Thrilled to successfully get to the end of this @Alex - appreciate these real-world worked examples.
This project gave me a taste of how challenging web scraping is. Great video that makes things look easy and less intimidating.
You don't imagine how this tutorial has helped me in my new position. Thank you so much!!
So glad it was helpful! :D
@@AlexTheAnalyst Did you ever make the second one? So many people want to see it? Please do send it out!
Hey Alex! Thanks for this helpful video! The best part of this video is whenever you said 'I don't know what that is' (12:50) , instead of some difficult theory. You don't know that, I don't know neither, so it makes me feel less pressure on learning python...
Wow!!! This is awesome!!! You have so easy way to teach, I already have a base with Python but I’ve never made this before and you make this so smother and easy to do!!!! Thank you thank you ❤
This is what I have been waiting for!
Thank you
Thanks Alex I am working on my own web scraping project for checking placements of searches and this video definitely helped
Hi Alex, I really appreciate how you shared how long this project actually took you. It helps to know the difference between what we go through on your channel and the work/time it actually takes behind the scenes. AWESOME project! I learned tons and found all of it very useful/helpful. You are such an AMAZING teacher and resource! As always, THANK YOU!!
Bro did you got nonetype error and how you solved it?
I have this error bro, and don't how to solve it
@@valadhruv6920
Your tutorials are so good. and i follow you on LinkedIn, your content is awesome. i love how you explain things in a clear way. keep up the great job!!
I am absolutely fascinated by your thorough explanation
Hi Alex, I have learn a lot from 65 videos of the Bootcamp. God bless with everything. Thanks!!!
Wow, this is EXACTLY what I have been looking for. Alex the GOAT in DA. :) You are 1000x Awesome!
The long awaited one ❤️💯
Thank you for demonstrating! I never thought that a simple project like this could use as a portfolio project. I just realized that I have what it takes to become a DA. Thank you for demonstrating projects!
Thanks man. You are helping a lot of people like me. Keep doing this portfolio videos!
Thanks a lot for enlightening on Web Scraping. Came to know only after watching this video that such stuff can be done.
I really like these long videos where you explain things like this instead short video, thanks for uploading Alex !
Glad to hear it! I try to change it up every so often :)
Thanks for sharing! This is an awesome video. I'm not sure if you did this but I think it would be cool to learn how to scrape multiple pages then append the data in a def function.
man i've been battling with the bot blocker from amazon and also some scraping issues with price because the website display was changed a while after this video was uploaded, but I've managed to pull it off so i hope this might help those recent viewers who might be as confused as me when I started writing this code on my own.
apparently you need to divide the second cell so you need to run the soup1 first before you run the soup2, then for the price you need to pull three part of span class=a-price-symbol, span class=a-price-whole, and span class=a-price-fraction and combine it together into 1 new variable (price), then you need to clean it using strip() and replace() to clean the whitespaces and
's.
hope this helps!
Brother please elaborate it, I am stuck
Hey bro can you explain it or can you share your code, how you pulled three part together. I am stuck in this part
Could you please explain it, I am stuck in getting Title itself
@@sdivi6881 Hey i just solved it can you tell little more where you are getting stuck
@@deeplakshmiyadav
price_symbol = soup2.find(class_='a-price-symbol').get_text(strip=True)
price_whole = soup2.find(class_='a-price-whole').get_text(strip=True)
price_fraction = soup2.find(class_='a-price-fraction').get_text(strip=True)
price = f'{price_symbol}{price_whole}{price_fraction}'
print(price)
Super early, love your stuff as always Alex!
You are very early! Lol Thanks for watching 😁
Wonderful! I'll practice with this tonight!
Mannnn pleaseeee keep going we need your help you tuts are on a whole diff level I am able to learn and understand with ease tnx a lotttttt and once again keep going
Simply the best video, thanks Alex.
Thanks so much Alex!! Just what I was looking for.
I'd like to appreciate you for sharing this wonderful video! Thanks to you, I've just managed to make my own webscraper that helps me to save so much time. Otherwise, my coworker and I would have to spend more than 6hours per week😂
Really cool project with an email feature in the end! Thanks, Alex.
What attracted me from your video hh is that you have 3 kids , this is a great man
God bless your family
Sir, I am very near to get my first job through your project
Thank you
And this is also my first project
Thank you! Amazing. Waiting for the next video 😉
After a looooong time delay cause by many things, finally I can finish this portfolio.
Great video alex ... it was really helpful for a module in my course . Please i have been looking for the intermediate video you spoke about
Great video. Thanks Alex!
As others described, if you get an error when running the second cell it's probably due to a captcha issue where amazon thinks you are a bot. You can force it by pressing ctrl + enter again and again until you get an output. I'm sure there is a better way to get around this but that's the quickest semi solution I found.
The while loop definitely doesn't work now that Amazon updated their website with some sort of blocker for bots. It might work a few times but eventually stops running in background.
You are great, this is exactly what is am looking for...
thanks Alex! really a great video... request you to kindly do a similar one on stocks realtime price capturing with time series and configure an email notification when the current price drops below say 50 day moving average ....
I am looking forward for many videos like this...thank you!
I thought you were now only gonna only make videos on management and stuff. Glad you are still making tutorials
Nah, content really won't change much - I'll be doing Tableau tutorials very soon
man it was super easy to understand, you nailed it
So glad to hear it!
It was a lot of fuuuuuun! Thank you Alex. Your channel has became one of my favorite about Python and SQL 🤓
So glad to hear that! :D
Thanks Alex. I’m a big fan.
anyone stuck trying to get the price.
price_symbol = soup2.find(class_='a-price-symbol').get_text(strip=True)
price_whole = soup2.find(class_='a-price-whole').get_text(strip=True)
price_fraction = soup2.find(class_='a-price-fraction').get_text(strip=True)
price = f'{price_symbol}{price_whole}{price_fraction}'
print(price)
Hi. I am not even able to print(soup1) due to some sort of anti bot blocking from Amazon. do you have any idea how to solve that? Thank you
Thank you!
Thank you man, I realized something was different with the html but lack the coding skills to fix it in a timely manner.
thumbs up, i've spend too much time looking for this comment, @Alex can you include that in the bio?
Hey Alex! It was a super helpful video. Thank you so much for posting it. Have you uploaded the next part of this video. If yes, Please share the link.
Love this .. I'm curious about the headers part I didn't know about that before
29:30 - quick tip: select the file, hold shift and right-click to get “copy as path” in the context menu.
Thanks Alex! this was really useful. I am waiting for the second part with the pagination 😅😅
This is super interesting, thank you very much!
Thanks for this awesome video, this would help me in the nearest future.
was waiting for this😍😍😍
you saved me a lot of time. I really appreciate it.
Thank you so much Alex!
Thank you so much, Alex! Your teaching style has made learning incredibly enjoyable and accessible. I've learned a lot in just one month and completed my portfolio projects, even though I skipped Excel and Power BI for now. Your anecdotes about your dog, family, and personal experiences have added a fun touch to the learning process. Your impact on learners like me is undeniable, and I'm looking forward to purchasing a course from your website soon. Keep up the fantastic work! 🥂🥂
Hi Alex, seems like this code is now not working. Would be grateful if you could do another web scraping project with EDA analysis?
Love how instructive your videos are.
Dude! I'm an amazon seller and this kind of work would come in super handy. Thank you. Did you ever get around to making the next video where you pull data from all the search results page? I'd be really interested to see that one.
Thanks again for sharing this video.
Thanks a lot Alex, I have learned a lot from your channel. Please keep on posting
One of the only channels with least haters ✨
I wish I had more so I could be cool
Thanks for this Alex..
nice video Alex ! Thank you
really cool, thank you for sharing!
Great stuff ! Please make the video where you show how to get for each item let's say the product description, reviews...etc.
I second that thought @Luis Ramos and honestly the video are really helping me better understand each topic in Data science with more depth and something more to try on myself piece of advice to fellow learners " Data science is not as simple as it was 2 years ago its been super competitive as there are 100 more individuals just to replace you so do expect hardships if you got the analytics skill keep polishing it "
nice Alex ,its Helpful Video ,Thank u So Much
By any chance was there a part 2 to this with the more advance scraping? Would love to see that :)
Looking for the part 2 you mentioned in the vid!! Thanks
This man a God send gift to ALL the Broke data analyst students
No kidding
this was really helpful... I'm planning on transitioning careers to data analytics and would love to see how it goes.
Hey Alex.....Thank You For teaching us ......
Hey Alex, thanks for the walkthrough. When is the next web scraping project coming? I'm so hyped.
Looking forward for that too
Great Video! really helpful. 👍
Wholesome Content !!! Thanks a Lot !!
Thank you so much Alex for your contents! Do you think you're going to do some projects regarding healthcare or covid 19 data? That'd be great!
Did you uploaded the second part.
I loved this one.
Please share second one
Thankyou Alexxxxx 🎉
Oh man I was thinking about a project related to amazon data scraping and here youtube suggested me B-)
Hope it helps!
@@AlexTheAnalyst Yes it was, Thank You :-)
Unfortunately it no longer works (due to Amazon website update I believe, as others have commented) :/ would love another scraping video so I can learn!! Love all the videos Alex and thanks so much!😊
@@nezzylearns happy to help
Were you able to bypass the Amazon scraping detection? I am also receining NoneType error.
@@VishalSharmaOfficialVS I unfortunately wasn't able to figure it out :/ This is one of the harder projects (to me) so I was going to circle back after going through the rest of Alex's projects. If you figure out how to bypass it plz comment here with an update!
@@krystlestevens2585 sure! I’m working on it. As soon as I have a concrete solution, I will post it here. Thanks for your reply.
@@VishalSharmaOfficialVS did you ever figure this out?
Great video, thank you very very much.
Really enjoyed this video! Any update on when the one for multiple pages would be ready? I didn't see it on your channel
Hello Alex!
One more step is done!!! It's so exciting, I got stuck at the stage where I had to get price data. I missed this metric to be scraped. Since the time you recorded this video some parts of html have been updated. So now price does not exist in the format of "ID=", it lives now as "div class=". So now it is challenging for to find out how to scrap the price though :))) will go deeper to the topic. Thanks much for your time and for sharing of your knowledge.
Hi Alex, great work as always! Are you still going to make the second Web Scraping video?
alex you are pure heart
thank you for everything!
You're most welcome Jorge!
Thank you Alex
Alex Thanks a lot for this wonderful tutorial, I really learn things from it, can you mention in any of your videos how we can pick colors as well from any product details if it is available in more than one color. A prompt reply will be highly appreciated. Thanks
When will be the next part of web scraping? Thank you for posting this video!!!!!
If anyone else has a problem like I did with getting a captcha output when printing soup2, I solved it by putting soup2 and the print statement in a different cell then run the first cell with soup1 then run the second cell with soup2 and the print statement separately.
I liked that email thing. I've used Scrapy in the past, but beautiful soup seems waaay easier. I'll create a cool project to watch prices for me :D
Thank You So Much !!!
Thank you for all you do! Your videos are inspirational and extremely helpful.
Will you be working on any Python interview example videos soon?
Hi Alex, this was really great! Thanks for doing this video. Did you ever do the follow-up video that was mentioned at the end of this video?
i'm interested in that follow up as well!!
Can you please make a video on how to present these projects? I've seen your video about the portfolio website, but I don't have an idea on how to actually present the github..
And thank you very much. Your channel has been very inspirational to me through out my learning journey!
Good idea!
@@AlexTheAnalyst Hi Alex, to further add to my comment - I've taken a look at other "best example" portfolios online but comparing it to the Google data analytics portfolio guidelines, they are very different. Hence my conflict and lack of general understanding on how to present these projects in a website.
Thank you.
When I try to print the title im getting an error message "'NoneType' object has no attribute 'get_text''. What is the issue here?
Same
Sir please make more portfolio projects for fun
Thank you so much Alex! I learned a lot from your videos and built my own portfolio. I decided to change my career to data analyst and start creating my resume. But I don't have data analyst experience, could you advise how to create a new resume with portfolio for someone wants to change career? should I focus on the projects?