Build A Python App That Tracks Amazon Prices!

  Рет қаралды 1,042,385

developedbyed

developedbyed

Күн бұрын

Пікірлер: 2 000
@heeheemanwhut
@heeheemanwhut 5 жыл бұрын
Begins with, "If you're poor, you're gonna love this episode". Noice.
@Sooyush
@Sooyush 5 жыл бұрын
Toit
@MsKoniki
@MsKoniki 5 жыл бұрын
Cool cool cool cool cool
@mahmouda.khalifa
@mahmouda.khalifa 5 жыл бұрын
I smell pennies
@ohokcool
@ohokcool 5 жыл бұрын
AM POOR, FEED CONTENT PLS
@35-barodmaftuhniam76
@35-barodmaftuhniam76 5 жыл бұрын
Bored i think
@MarioOrtiz008
@MarioOrtiz008 5 жыл бұрын
Instead of price[1:5] you could have used price[:-3]. That way, the actual length of the string doesn't matter. It will just remove the last 3 characters (decimals + € symbol)
@RickyC0626
@RickyC0626 5 жыл бұрын
Or you can do price[1:] to get all the characters after the currency symbol and cast it to float. The resulting value can also be used to calculate total price for a list of products
@Chemistry-uh2gj
@Chemistry-uh2gj 5 жыл бұрын
@@RickyC0626 Good idea!
@borispsalman
@borispsalman 5 жыл бұрын
or use regular expressions but as for me i still dont understand them fully :D
@CFabio6
@CFabio6 5 жыл бұрын
This! if the price goes under 1000 it's gonna crash with price[1:5]
@sidheshwartiwari9834
@sidheshwartiwari9834 5 жыл бұрын
Noice
@jakeruth4603
@jakeruth4603 5 жыл бұрын
"It will never stop, just like my mental state." Once again, I am left with more questions than answers. Thank you Ed -jake
@ramiiii
@ramiiii 4 жыл бұрын
wonderful.
@Sagar_Sorout
@Sagar_Sorout 4 жыл бұрын
It's not working in my system
@Sagar_Sorout
@Sagar_Sorout 4 жыл бұрын
It's not working
@buybestphone
@buybestphone 4 жыл бұрын
@@ramiiii amazing too.
@alialshah8466
@alialshah8466 3 жыл бұрын
Will the program continue running if I close the pycharm
@gimmeplaylistnow
@gimmeplaylistnow 5 жыл бұрын
This dude: "Okay, if you're poor, you're going to love this episode! Me: "I'm listening..."
@69erthx1138
@69erthx1138 5 жыл бұрын
Me: No shit-te!
@ob_isaiah
@ob_isaiah 4 жыл бұрын
Haha
@reaperagario2961
@reaperagario2961 4 жыл бұрын
Just to clarify! 1) On 13:45 he uses two ' ' (newline) because the SMTP protocol wants you to format the email this way: Subject: YOUR_SUBJECT //empty_line ACTUAL_MESSAGE . //a line only with a dot 2) On 11:31 he connects to the mail server through the port 587 because that's the default port SMTP uses. SMTP also uses TLS to send the data through packets and they're encrypted. Enjoy!!
@JosepPi
@JosepPi 5 жыл бұрын
sees while(true) *Yells in C++*
@dmitrov6464
@dmitrov6464 5 жыл бұрын
*Never stops yelling*
@davidson2329
@davidson2329 5 жыл бұрын
I started learning c++ and I am now kinda used to it and when I look at this... why didn't he make a universal function....
@zaraf
@zaraf 5 жыл бұрын
I was so triggerd
@walfranpinto80
@walfranpinto80 5 жыл бұрын
im new to coding, mind explaining?
@psd.3144
@psd.3144 5 жыл бұрын
@@walfranpinto80 it's just an infinite loop that will always run when the program gets to it. True is always true so it will never not run. You usually want some kind of limit on how much a loop can run, especially in something like the c language family. Python kinda saves you from bad memory management because it does a lot on it's own, but it is a convention not to do that if others are working with or going to use your code. Since this is more of a concept style of video tutorial, it isn't really an issue though.
@lolmeeky
@lolmeeky 2 жыл бұрын
thank you so much for this tutorial! some things dont currently work (since this video is a few years old now and Amazon has changed your ability to scrape from them, it seems), but I still learned the basics about web scraping from this! I changed up my program to also send price differences from other websites too. Even the parts about 2-factor verification were useful and now its something extra I know! Thanks again!
@shahfahad.muslim
@shahfahad.muslim 5 жыл бұрын
I'm not still in Python, but subscribed to make sure that this awesome man stays when I need him. thanks for cool stuff bro.
@user-te1le7ck6b
@user-te1le7ck6b 5 жыл бұрын
Brilliant as a computer science teacher I will be utilising this for a project Keep up the great work
@hamidnikbakht1295
@hamidnikbakht1295 4 жыл бұрын
This guy is a legend! Just look at the way he sits behind his computer and in front of camera!
@onrebruit
@onrebruit 5 жыл бұрын
Your videos are natural and unique. You make me feel we are having one on one tutorials.
@andreaf6143
@andreaf6143 5 жыл бұрын
Good sample but anyway you have to use in headers the directive 'Cache-Control': 'no-cache' else you will see the same page always and you can't get the new price. headers = {'Cache-Control': 'no-cache', "Pragma": "no-cache"}
@alexanderandrukov9903
@alexanderandrukov9903 5 жыл бұрын
Are u sure? Shouldn't it check first the date of the last real update of a page before returning cached page? Hint: there is a special header for that in HTTP protocol.
@devmarkk
@devmarkk 5 жыл бұрын
i'm interested, following the conv
@TrimorphMC
@TrimorphMC 5 жыл бұрын
15:05 Duplicate code; you forgot that you already wrote that!
@nourios6991
@nourios6991 5 жыл бұрын
Marked as duplicate.
@nonsudunk
@nonsudunk 5 жыл бұрын
@@nourios6991 I understood that reference!
@saptarshisengupta5073
@saptarshisengupta5073 5 жыл бұрын
What do you expect. They know shit about programming.
@clank2269
@clank2269 4 жыл бұрын
@@saptarshisengupta5073 what
@DontBeMadBro
@DontBeMadBro 5 жыл бұрын
just to point out, remember that price[0:5] will not be effective for smaller prices, in such a case, i would consider split this string by delimiter, which is dot and then save the first part of the outcome. This way script won't be dependent by different number of digits, nice tutorial!
@HaynesX
@HaynesX 5 жыл бұрын
Why not just .replace() the comma and currency symbol with nothing and convert to float to get the exact price? Or is that very inefficient?
@98Etienne98
@98Etienne98 5 жыл бұрын
Thank you! I'm trying to learn python and little projects like this are really what i was looking for!
@aipython
@aipython 4 жыл бұрын
Good to know that you are interested in Python project, I have also created a playlist for Python project. Do check it: kzbin.info/aero/PLBeeFF3JmXWCQh987TsdowLK5U8XwbSzw
@idhamarsyd
@idhamarsyd 5 жыл бұрын
Awesome!! Maybe you can share your setup about VSCode, sir! Your theme, fileicon theme, font or even useful extension. Thanksss
@balhazer
@balhazer 5 жыл бұрын
x34, deliver dude, pretty please!
@nikolayvarlamov4065
@nikolayvarlamov4065 5 жыл бұрын
Matherial theme He has a video about his VS CODE config: kzbin.info/www/bejne/i33WpINsaKabhtk
@kentlai
@kentlai 5 жыл бұрын
I'm a Python beginner, your video is awesome. Please make more Python tutorial
@poly2081
@poly2081 4 жыл бұрын
5:18 someone at amazon has too much time
@schavan1
@schavan1 4 жыл бұрын
LMFAO
@alwinvillero4404
@alwinvillero4404 4 жыл бұрын
wtf
@eatdapoopoo67
@eatdapoopoo67 4 жыл бұрын
Duck boi
@rogerm4a1
@rogerm4a1 4 жыл бұрын
I was wondering the same thing! LMAO
@hiwab41
@hiwab41 4 жыл бұрын
.__(.)< (MEOW) \__)
@notrash4256
@notrash4256 4 жыл бұрын
If you want to make it more flexible try: pricewithouteuro = price.replace('€','') pricewithouteuro = pricewithouteuro.replace(',','.') convertedprice = float(pricewithouteuro) print(convertedprice)
@ugurkoc3030
@ugurkoc3030 5 жыл бұрын
For who has problems about converting string to float, you should replace coma with point price = soup2.find(id= "priceblock_ourprice").get_text() converted_price = float(price[1:6].replace(",",".")) print(converted_price) Output = 1.998
@jackbird5839
@jackbird5839 3 жыл бұрын
I am python beginner and this simple application will give some good practice great solution and tips bro!! thank you for your video. as a non-tech user, I am using amazon review scraper e-scraper maybe it helps to somebody too.
@vskiy26
@vskiy26 3 жыл бұрын
Thank you, Jack, awesome tip. ESCRAPER really helps me.
@willjohn6807
@willjohn6807 3 жыл бұрын
awesome suggestion Jack. it helped in my case.
@jonatanlast3849
@jonatanlast3849 2 жыл бұрын
Bölüm
@jonatanlast3849
@jonatanlast3849 2 жыл бұрын
proyecto usando python
@jonatanlast3849
@jonatanlast3849 2 жыл бұрын
lihtne rakendus
@richarddoci
@richarddoci 5 жыл бұрын
loving the python tutorials! It'd be awesome if you did a python app with some interfaces or something. 😄
@utsavprabhakar5072
@utsavprabhakar5072 5 жыл бұрын
Trueeee
@CrypticConsole
@CrypticConsole 5 жыл бұрын
Just write the price to a tkinter frame
@nathanwise9271
@nathanwise9271 5 жыл бұрын
Tkinter is fun...
@Towzlie
@Towzlie 5 жыл бұрын
Python isn't mean to dev GUI apps
@nathanwise9271
@nathanwise9271 5 жыл бұрын
Towelie why not?
@GabrielsEpicLifeofGoals
@GabrielsEpicLifeofGoals 5 жыл бұрын
I am only concerned at the fact that Amazon used "MEOW" somewhere in their code...
@gatikgarg4007
@gatikgarg4007 4 жыл бұрын
That was a comment
@hidalg
@hidalg 4 жыл бұрын
jajajaja me too
@CODEBYTE
@CODEBYTE 4 жыл бұрын
someone had too much time to include that . Lmao .
@mohamedaminealouini4292
@mohamedaminealouini4292 5 жыл бұрын
There are 2 enhancements for this video First one: You could pass the URL as an argument, so the function could be more generic Second: If you were on Linux (I don't know about Windows), you could use CRON Jobs to execute the code Nice job and good episode
@patriotsecular6631
@patriotsecular6631 5 жыл бұрын
hey ed, prashant here.. i appreciate the way you are always smiling and something in the presentation takes the stress out of the coding part :) I am a subscriber to the channel now ::)
@aryankatebain
@aryankatebain 5 жыл бұрын
Man please more videos... You are a fantastic teacher 👨‍🏫
@raqha4575
@raqha4575 5 жыл бұрын
"And dont send 1000 request to mess with their server"... pff you know us. We never wanna do things like this...
@FlyingUnosaur
@FlyingUnosaur 3 жыл бұрын
Amazon isn't very pro scraping. They'll block you real quick.
@16bitart
@16bitart 3 жыл бұрын
​@@FlyingUnosaur True, that's way I had to develop scraper that use 50+ threads to collect thousands of products every day.
@FlyingUnosaur
@FlyingUnosaur 3 жыл бұрын
@@16bitart did you use proxies?
@16bitart
@16bitart 3 жыл бұрын
@@FlyingUnosaur Yes, this is only way. But I used free proxies with rotation.
@FlyingUnosaur
@FlyingUnosaur 3 жыл бұрын
@@16bitart ok thank you
@JarosawTabor
@JarosawTabor 5 жыл бұрын
Ok. After this video I'm definitly sure, that I want to learn Python. Damn. Easy win.
@DarrenSemotiuk
@DarrenSemotiuk 5 жыл бұрын
Seems python = crush JavaScript first, then forget { } exist instead just indent #ez
@pythonwonderwoman7164
@pythonwonderwoman7164 4 жыл бұрын
I have added also 'else' with small print to inform me that price has not changed without while True loop. and I used Windows task scheduler to check the price once per day. thanks a lot, love your positive attitude!
@Sawell123
@Sawell123 4 жыл бұрын
I found a solution for the "none" return/error instead of the title (or price - depends what you want to scrape): instead of writing soup = BeautifulSoup(page.content, 'html.parser') I used soup = BeautifulSoup(page.content, 'lxml') and it works for me. I got to the point that i can send emails :) thanks for this tutorial!
@nmana9759
@nmana9759 4 жыл бұрын
Thank you so much!!
@sagargada73
@sagargada73 5 жыл бұрын
" In python we are cooler we do this the other way" 😂😂😂
@brewman467
@brewman467 4 жыл бұрын
Afaik there is no Import in JavaScript. However it exists in NodeJS.
@alialshah8466
@alialshah8466 3 жыл бұрын
Would the program still run if I close pycharm
@damnatioodiosis5537
@damnatioodiosis5537 3 жыл бұрын
@@alialshah8466 i had the same doubt
@prajwalpkulkarni
@prajwalpkulkarni 4 жыл бұрын
Thank you Dev Ed! This works! I feel so powerful right now xD Looking for more tuts from your side! Cheers from India!
@MaBuSt
@MaBuSt 4 жыл бұрын
this was a great episode, thanks! i'm new here but appreciate the simplicity - almost would prefer you also show you googling the things you googled to FIND the packages you dl'd and imported. SOunds a little goofy, but really new people often ask how you knew what packages to use, and it's so helpful to show experienced people googling it.
@Marco110981
@Marco110981 3 жыл бұрын
You can have this python script executed in crontab (if using Linux), so the script will be run systematically some, say, 1 or 2 times a day, and the price will be checked in the background without even noticing it. I included the logging of the price to a text file, and the plot of its temporal evolution so to have a nice overview of the trend, and for each item I have included in a a list (with its belonging threshold). Keep it up, Dev Ed - nice going!
@susannam3923
@susannam3923 2 жыл бұрын
did anyone else have the problem where the soup data was really short and had things like "if you want access go to some Subscription API" and "we want to make sure you're not a bot and you should enable cookies"
@gulle7578
@gulle7578 5 жыл бұрын
“HAVE YOU HEARD OF HONNEY!” “THIS VIDEO IS SPONSORED BY HONEY” “THIS VIDEO WOULDN’T BE POSSIBLE WITH OUT HONEY”
@melatoninik
@melatoninik 4 жыл бұрын
MisterabEAST lol
@NackDSP
@NackDSP 4 жыл бұрын
Awesome. I set this up on my Raspberry Pi and had it ring a bell when my price target was reached. Saved me $100 today.
@adityashinde3864
@adityashinde3864 5 жыл бұрын
Please make more JavaScript videos.
@developedbyed
@developedbyed 5 жыл бұрын
Will make js videos too don't wory, but it can get a bit monotone for me to only do that 24/7 😀
@krishnaprasad3350
@krishnaprasad3350 5 жыл бұрын
SMTPLIB stands for Simple Mail Transfer Protocol LIBrary. It is used to send,read,etc emails on a basic level.
@pistolpeet5325
@pistolpeet5325 5 жыл бұрын
smtplib is a library in Python that uses the SMTP(simple mail transport protocol) layer to send emails from a client
@kimzauto5045
@kimzauto5045 5 жыл бұрын
hmmm Yahoo?... internet modem flash backs🔥🔥🔥🔥🔥
@cheskoxd
@cheskoxd 4 жыл бұрын
9:15 he googled python web scrapping amazon XDXDXD i love this man xd
@nonamenoname2618
@nonamenoname2618 5 жыл бұрын
But as soon as you close the program (the code in Virtual Studio) you also close the loop, correct? So you need to have your python-program continuously running?
@TheDirtyClean
@TheDirtyClean 5 жыл бұрын
Noname Noname yea same thoughts. Has to run on a server to be not useless i guess :D
@johnmcmenamin7692
@johnmcmenamin7692 4 жыл бұрын
Or use cron/a scheduler to run it occasionally
@Lukas-ds4qp
@Lukas-ds4qp 4 жыл бұрын
I would like to program a dynamic logogenerator with export and preview function in Python. Specifically, an existing image is to be supplemented by five entries - after which the supplemented logo can be exported as ".zip", where .png, .pdf, and .png of the logo can be found. In addition, there should be two preview areas, which should dynmaically adapt to what has been entered in the above mentioned entries. There will be two preview areas to the right of the five entrys
@ericlin8331
@ericlin8331 5 жыл бұрын
I need this guy in my life Subscribered.
@3AgL3DeeJay
@3AgL3DeeJay 5 жыл бұрын
13:19 why not just add the "URL" variable after that string? that way you won't have a problem if you modify only the link above and forget about the second one
@jasperdiscovers
@jasperdiscovers 5 жыл бұрын
came here looking for this comment :)
@3AgL3DeeJay
@3AgL3DeeJay 5 жыл бұрын
@@jasperdiscovers Nice :))
@PauJuanes
@PauJuanes 5 жыл бұрын
And literally ONE second later he uses f' ' string formatting to explain how to include a variable inside a string LOL. He also called the send_mail() function twice with two identical if statements. I guess he forgot he already wrote that piece of code two minutes earlier. Anyway, he did a really good job. Not complaining at all.
@povilaskirna4108
@povilaskirna4108 5 жыл бұрын
You should explain how to make it run silently and on the start of the pc
@adventune375
@adventune375 5 жыл бұрын
(On windows 10. Haven't tested on other versions of windows or any other os) Make the .py file .pyw file. Then type win+r and type 'shell:startup'. It will open a folder where you move your .pyw file or shortcut to it. Next time you boot it will run script silently on the background. You're welcome Edit: Also change the code so that if the price hasn't dropped it goes back to checkPrice() and quits when it has dropped and send the mail
@ZeroPlayer119
@ZeroPlayer119 5 жыл бұрын
@@adventune375 can you run this on a web server ?
@adventune375
@adventune375 5 жыл бұрын
@@ZeroPlayer119 I don't know. Haven't tested it. You maybe need to modify it a bit but it could be possible
@Jmonsky
@Jmonsky 5 жыл бұрын
@@ZeroPlayer119 Yes, as long as the web server has python installed.
@dachs91
@dachs91 5 жыл бұрын
You could also just move the script to your windows startup repository (:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup). I also made a schedule system for the script. I will post the link to my github if you want it.
@rupareddyvudumula7796
@rupareddyvudumula7796 4 жыл бұрын
LOVED IT BRO...UR EXPLINATION IS LIT.......
@jasonabba3934
@jasonabba3934 5 жыл бұрын
DISCOVERED YOUR CHANNEL LAST NIGHT! TOO GOOD.
@sreerammeka9238
@sreerammeka9238 5 жыл бұрын
I have a question, when I try to print using "print(page.status_code)", the result is 503 which means that the service is unavailable, what does it mean? Does it mean it is not available to handle our requests??
@rishabhraj2446
@rishabhraj2446 5 жыл бұрын
I tried but when I try to find something it returns none 😅
@leveltube10
@leveltube10 5 жыл бұрын
Me also! What goes wrong?
@edinsonrequena1089
@edinsonrequena1089 5 жыл бұрын
also to me and I tried everything
@jugginator4390
@jugginator4390 5 жыл бұрын
If you're printing a function, it'll likely return none there. None is returned when, well, nothing is returned haha. He's printing off something the has a value inside the function which is why it worked, but if you just print a function, it'll say none unless you return something. Kinda like, say I made a function def math(): x = 5 x 5. if I print(math()), it'll say none. If i add a return, like def math(): x = 5 x 5 return x, now the print will display 25.
@dunkboyys2361
@dunkboyys2361 5 жыл бұрын
Try typing requests.get(URL), instead of requests.get(URL, headers=headers). Line 9 on video.
@dansvanz92
@dansvanz92 5 жыл бұрын
@@dunkboyys2361 Thank you
@scorpion32
@scorpion32 4 жыл бұрын
omg this is so useful, I'm gonna apply this to other things
@AakashBanodhe
@AakashBanodhe 5 жыл бұрын
Of all the tutorials I have seen, this explained far better. Thanks.
@nikhili9559
@nikhili9559 4 жыл бұрын
Float --> includes decimal values as well :)
@MrPherez
@MrPherez 5 жыл бұрын
I like your project, keep sharing mind blowing projects champ
@thomasdejong232
@thomasdejong232 5 жыл бұрын
In my VS code i don't see an explanation of the functions as you have. At 5:01 typing "title = soup.find" How can I get this?
@yassineelb8735
@yassineelb8735 5 жыл бұрын
guess python extension for intellisense
@DamienLaRocque
@DamienLaRocque 5 жыл бұрын
You get that by installing the Python extension : marketplace.visualstudio.com/items?itemName=ms-python.python
@samanbalal824
@samanbalal824 5 жыл бұрын
At 16:30 , why converted_price > 1.700 in two if statements?
@The_TermiGator
@The_TermiGator 5 жыл бұрын
he forgot he did it already and didn't notice
@Pcpiee
@Pcpiee 5 жыл бұрын
just to be extra sure
@thebiziii
@thebiziii 5 жыл бұрын
By the way, these two conditions are not the same..
@youtu6er860
@youtu6er860 5 жыл бұрын
@@thebiziii What do you mean that they are not the same. He changed the second one, that's true but only because he wanted to demonstrate the function if the condition is true. They are both the same
@thebiziii
@thebiziii 5 жыл бұрын
> is not the same as
@venkateshdas5422
@venkateshdas5422 4 жыл бұрын
No one has noticed the redundant "if" statement that has been used in the check price function. Other than that I found the video to be very useful and clean . Thanks for the upload!
@proyxm
@proyxm 5 жыл бұрын
This is so cool! I'm using it to track System of a down tour data, it will create a link-file to the page on my desktop as soon as there are new tourdates scheduled. I don't even have to check emails. Thank you so much! Want to give multiple thumbs up!
@omonibash4556
@omonibash4556 5 жыл бұрын
I am facing this problem when I try to print title on 6:34 AttributeError: 'NoneType' object has no attribute 'get_text'
@Toopa88
@Toopa88 5 жыл бұрын
Because you have to check the name of the "id". You can't simply copy his id because it returns None if it doesn't find anything. You are basically doing None.get_text()
@rayanaay5905
@rayanaay5905 5 жыл бұрын
Same. Any advice?
@timetosleep8055
@timetosleep8055 5 жыл бұрын
He is using the .de (germany) domain and not .com (international), if you use the german or uk domain it will work.
@ugurkoc3030
@ugurkoc3030 5 жыл бұрын
if soup2.find(id="productTitle").__len__() > 0: title = soup2.find(id= "productTitle").get_text() print(title.strip()) else: title = "No result" print(title)
@zaidangaming1288
@zaidangaming1288 5 жыл бұрын
Subscribed! Didn’t know about you, saw one video and now you’re my fav! Haha.
@aipython
@aipython 4 жыл бұрын
Hello, Do check out the cool Python project video from this playlist: kzbin.info/aero/PLBeeFF3JmXWCQh987TsdowLK5U8XwbSzw
@fun-ih5sc
@fun-ih5sc 5 жыл бұрын
Awesome man , loved this. Just now executed my code. Thanks a lot for making this video keep making video like this
@rimini201
@rimini201 4 жыл бұрын
Wahey - I just did this and it totally works. Now I need to use Python to automate other aspects of my life... thanks dude!!
@ahmadaminfarooq8495
@ahmadaminfarooq8495 5 жыл бұрын
Started from here and now Scrapy expert, Amazing video.
@obaidashurbaji9223
@obaidashurbaji9223 4 жыл бұрын
at min 5:45 i tried it and it gave me this (AttributeError: 'NoneType' object has no attribute 'get_text') what's the problem?
@godihateyoutube
@godihateyoutube 4 жыл бұрын
In the documentation for Beautiful Soup, it says that the find() method will return None if no element with the given id is found. Meaning, whatever you listed as the id was not found in the html content you pulled.
@noahsigel3529
@noahsigel3529 4 жыл бұрын
@@godihateyoutube you cant use bs4 anymore
@keremozbakir8089
@keremozbakir8089 4 жыл бұрын
The solution is actually quite easy, html parser cant parse Amazon html very well just use html5lib instead or lxml my friend
@juliangeiler2515
@juliangeiler2515 4 жыл бұрын
it works but only every 4th or 5th time =( what can i do now?
@keremozbakir8089
@keremozbakir8089 4 жыл бұрын
@@juliangeiler2515 what's the error you get? I will try to help you if i can.
@abhinavdeep6628
@abhinavdeep6628 5 жыл бұрын
Hey dude, this is 1st time I'm watching your video but loved it really I mean I'm in love with it. Yeah and subscribed it with notification bell so don't worry. See you soon.😍😍
@danielrubenacker8206
@danielrubenacker8206 5 жыл бұрын
"it's not stopping! It will never stop, just like my mental state" lol, lmao. ;)
@1polyron1
@1polyron1 5 жыл бұрын
Shit
@koveh
@koveh 5 жыл бұрын
Hello, I made the same code, but I have an error with .get_text() it sounds like ‘Nonetype’ object has no attribute ‘get_text’. How to solve?
@eshikagupta6616
@eshikagupta6616 3 жыл бұрын
I can't get over the way he's sitting😂😂.....I sit like that either when I know too much about how i'll be going ahead with the coding or I literally know nothing...BTW this project is super cool!!
@rishijoshi5808
@rishijoshi5808 5 жыл бұрын
Yo, great content bruh. Could you also share with us as to how do you research about those libraries you used in the video? Thanks very much!
@justincv
@justincv 5 жыл бұрын
Hey Rishi! You can have a look at www.tutorialspoint.com/python/python_modules.htm Specifically have a look at built-in modules :D Good luck
@3AgL3DeeJay
@3AgL3DeeJay 5 жыл бұрын
14:45 how can you not see that you have the same if condition and send_mail() function just 3 lines above....???
@bruhmoment_79
@bruhmoment_79 5 жыл бұрын
5:16 How come when I print(title) it says None
@mudman4048
@mudman4048 5 жыл бұрын
R u sure your variable is named correctly?
@crashbunks
@crashbunks 5 жыл бұрын
soup = bs(page.content, 'html.parser') soup2 = bs(soup.prettify(), "html.parser") use soup2 instead
@jamesfriend4865
@jamesfriend4865 5 жыл бұрын
im having same problem
@pratikrana2265
@pratikrana2265 5 жыл бұрын
​@@HansPeter-gx9ew I'm using Ubuntu OS. I'm facing same issue.. I tried your suggestion but it doesn't work for me. Error : The code that caused this warning is on line 11 of the file scraper.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor. soup1 = BeautifulSoup(page.content, "html") scraper.py:12: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently. The code that caused this warning is on line 12 of the file scraper.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor. soup2 = BeautifulSoup(soup1.prettify(), "html") output : None
@jacobmoran3102
@jacobmoran3102 5 жыл бұрын
@@HansPeter-gx9ew Thank you! However, I got warning to specify a parser, so I used "lxml" instead of "html." Works as expected now.
@angelowolff7127
@angelowolff7127 5 жыл бұрын
u can also just fetch all the html data, compare new and old data and if they are different, then a change was made on the page. then just pull whatever data was changed into a table. u can also use text logic like integer,integer.integer is most likely assumed as the price format, then u can redact all string results and u most likely will end up with a collection of changed prices. I think this way allows the only changing input to be the site address, but can be used on multiple sites that use the price format integer,integer.integer.
@angelowolff7127
@angelowolff7127 5 жыл бұрын
or just use amazon api
@ad910am
@ad910am 5 жыл бұрын
if soup.find returns None, what u have to add is: soup1 = BeautifulSoup(soup.prettify("utf-16"), "html.parser")
@danielratner
@danielratner 4 жыл бұрын
Thank you
@raphaelzerah3280
@raphaelzerah3280 4 жыл бұрын
still. not. working for me did amazon change something ?
@aoof6742
@aoof6742 5 жыл бұрын
13:27 USE THE VARIABLE OH MY GOD.
@kamilmuza4417
@kamilmuza4417 5 жыл бұрын
if statement with parentheses? python zen: We don't do that here my friend.
@demeter1793
@demeter1793 5 жыл бұрын
The while loop as well
@kamilmuza4417
@kamilmuza4417 5 жыл бұрын
Дмитрий Авдеев didn’t watch that long, as soon as i saw that, i just bailed.
@nauzetmartin325
@nauzetmartin325 5 жыл бұрын
Do you not declare the conditional twice? thanks for your video!!
@rodrigoalvesvilela23
@rodrigoalvesvilela23 5 жыл бұрын
He did. saw it too xD
@HotShame0
@HotShame0 4 жыл бұрын
We can use Regex to extract the price without specifying the elements, because what if the price by magic went down to the 10s or 100s. Here's how i would extract it ... x = re.findall("[0-9]+\.?[0-9]*", price) then use float(x) i never programmed in python but i learned it from java, and found that the library for regex in python is re.
@CarlosRodriguez-vg2ob
@CarlosRodriguez-vg2ob 4 жыл бұрын
Man this was FANTASTIC
@TheTrophieStars
@TheTrophieStars 4 жыл бұрын
Seems as if amazon no longer easily allows scraping like this.
@mokafi7
@mokafi7 4 жыл бұрын
oh is that why it wasnt working for me? i wasted 3 hours trying to get this working...
@pai64
@pai64 4 жыл бұрын
@@mokafi7 F
@FRElHEIT
@FRElHEIT 4 жыл бұрын
I expected this and first searched the comments before wasting hours of my life. F
@reedheadable
@reedheadable 4 жыл бұрын
@@FRElHEIT I added a Referer to my header and it seem to bypass the web scraper block ex. Referer : "www.google.com"
@pytharian2660
@pytharian2660 4 жыл бұрын
Works for mw
@tylermcchesney2314
@tylermcchesney2314 5 жыл бұрын
Anyone else have issues with the .get_text() request when he defined title and price?
@__-vq9mb
@__-vq9mb 5 жыл бұрын
Try importing: from django.utils.translation import gettext
@gamzaify
@gamzaify 4 жыл бұрын
Did you find a solution? Getting this as well
@kelvinmwongera7320
@kelvinmwongera7320 4 жыл бұрын
@@__-vq9mb exactly as you've typed it or what command should we put in the terminal?
@shafmairaj6493
@shafmairaj6493 5 жыл бұрын
i have written the same code like yours and i got "None" after executing the file help please!
@sibbonsshrestha3438
@sibbonsshrestha3438 5 жыл бұрын
soup = BeautifulSoup(page.content, 'html.parser') soup1 = BeautifulSoup(soup.prettify(), "html.parser") title = soup1.find(id="productTitle") print(title) recommended by a guy earlier
@ennissg
@ennissg 5 жыл бұрын
@@sibbonsshrestha3438 Thank You
@varunbhonsle8109
@varunbhonsle8109 4 жыл бұрын
that part is written in JS so its technically not there.use selenium
@filippocerchi1083
@filippocerchi1083 4 жыл бұрын
@@sibbonsshrestha3438 I LOVE YOU.
@marioalfredo98
@marioalfredo98 3 жыл бұрын
When you use request to get te page contents, I'd recomendd you to do it using an exception, because if your internet falls down your code will brake, so if you add an excepcion somethin like except ConnectionError:, then your program still works even if you don't have any internet. BTW, really good video mate, I've learned so much.
@happychuckprogramming6048
@happychuckprogramming6048 4 жыл бұрын
very nice video. Selenium based applications help in tracking amazon prices, ordering food, shopping automatically using python. Make our lives so much easier.
@ArchHyperion
@ArchHyperion 5 жыл бұрын
lol when you set the price to price[0:5], this is bad programming. always do a regex lol. I'm also wondering how the euro symbol disappears in that string splice. when you start at 0, it should get the first character which is the euro symbol right?
@yskhcl
@yskhcl 5 жыл бұрын
Or for this specific case, you can find the euro sign and split the string until it, I agree with you man
@ArchHyperion
@ArchHyperion 5 жыл бұрын
@@yskhcl i just find it strange lol.
@aravinda513
@aravinda513 4 жыл бұрын
I too had the same query!
@MostafaKhaled-c8q
@MostafaKhaled-c8q 5 жыл бұрын
please more javascript tutorial
@FoxFollowSMMPanel
@FoxFollowSMMPanel 5 жыл бұрын
احا عنينا
@ommandavia
@ommandavia 5 жыл бұрын
Hey there! Thanks a lot for sharing your knowledge. It helps a lot for students like me to stand apart. :)
@tuz6820
@tuz6820 4 жыл бұрын
awesome video. i’m gonna use this as a base for practice and make a little web app out of it which allows the user to input an url himself :)
@igorstasenko9183
@igorstasenko9183 5 жыл бұрын
float takes its name from 'floating point number'. float is the way how you store numbers in memory, and surely you can represent 'whole numbers' like 5 using float
@leonardodicaterina7675
@leonardodicaterina7675 5 жыл бұрын
so... those hideous automatic mail bombing advertiser may have their internet security lowered? interesting
@cankarkadev9281
@cankarkadev9281 4 жыл бұрын
No probably not, you just need to lower your security level if you send mails from your local computer without having a physically real server. If you have one you can just write mail.send or something and the mail is going to be sent as well
@ziinx5899
@ziinx5899 3 жыл бұрын
Looks like Amazon updated their site. It keeps detecting me as a bot and gives me a different html.
@anshumanparekh3603
@anshumanparekh3603 3 жыл бұрын
why does it not work anymore?? it just says none instead of price
@sola2943
@sola2943 6 ай бұрын
I ran into that problem too. I even changed the text to a-price-whole to reflect the page's current format. 🤷
@nabiha3358
@nabiha3358 3 жыл бұрын
You're honestly the best to learn coding from
@greaper3180
@greaper3180 4 жыл бұрын
1:40 and i liked you already. Subscribed. I like how you talk about programming like it's some magic stuff.
@archerplayz1317
@archerplayz1317 4 жыл бұрын
when ever i use .get text this comes up please help:Traceback (most recent call last): File "main.py", line 7, in title = soup.find(id="productTitle").get_text() AttributeError: 'NoneType' object has no attribute 'get_text' 
@clank2269
@clank2269 4 жыл бұрын
try these out: soup = BeautifulSoup(page.content, "html5lib") (you need to install html5lib) if this doesnt work use New code: soup = BeautifulSoup(page.content, 'lxml')
@tinkug2798
@tinkug2798 4 жыл бұрын
Hi, i tried html5lib as well as lxml. Same error , could you please help.
@LaffyToffy
@LaffyToffy 4 жыл бұрын
@@tinkug2798 are you finding element by id or class? if you are using class use: title = soup.find("div", {"class": "_35KyD6"}).get_text()
@tinkug2798
@tinkug2798 4 жыл бұрын
@Ayush, hey ayush, i am finding by id just like it is shown in the video
@tinkug2798
@tinkug2798 4 жыл бұрын
Thanks Ayush. I think i got the issue it is varying from website to website, i tried on amazon.in same code worked perfectly fine. Amazon.com it is throwing this error .
@ronanpeter8657
@ronanpeter8657 5 жыл бұрын
could not convert string to float:(
@Jagddish
@Jagddish 5 жыл бұрын
Mine too! use single quotes converted_price < '1,700' as a string
@fadhlulfahmi5125
@fadhlulfahmi5125 5 жыл бұрын
in my case, the output of price variabel is $1,700.00 or something like that,, so I make the code like this: converted_price = float(price[1:6].replace(",", ".")) this will return a float 1.700
@abbyboing
@abbyboing 5 жыл бұрын
@@fadhlulfahmi5125 Even I had to StackOverflow this stuff. Pretty confusing as str_replace() was not working properly but the . operator did the perfect job. You know why str_replace() didn't work? depreciated?
@fadhlulfahmi5125
@fadhlulfahmi5125 5 жыл бұрын
@@abbyboing as far as i know, python use str.replace() not str_replace()
@abbyboing
@abbyboing 5 жыл бұрын
@@fadhlulfahmi5125 maybe str_replace() would've been some old function, as I did see alot of that on stack overflow.
@aniruddhagaikwad1747
@aniruddhagaikwad1747 3 жыл бұрын
Thanks for the Tutorial Dude. You have introduced web scraping to me. Keep up the good work. # below code is for converting price into float. string = price string = string.replace('₹','') string = string.replace('$','') string = string.replace(',','') converted_price = float(string[:-3])
@mohamedyusef9174
@mohamedyusef9174 5 жыл бұрын
can you make an app that buys the camera automatically whenever it reach a certain price...is it possible?
@sevcandincel
@sevcandincel 5 жыл бұрын
MOHAMED YUSEF i think you can make it whit selenium module. Its use in web automation.
@Andrei-rp3dz
@Andrei-rp3dz 5 жыл бұрын
Yeah but it's better to use Selenium for that. That being said, Amazon might stop you from connecting if you use a headless browser, so try some stuff out.
@user-cd6vy2jg6f
@user-cd6vy2jg6f 5 жыл бұрын
Andrei Lazar if it’s online there’s a way for it to be done. Amazon can do a lot to prevent it, but a determined coder can find away around it. Wether that be scraping the page for the CSRF token and sending that in the header or a hidden form value - its impossible To prevent a public page from being used by bots completely
@ryankraft9897
@ryankraft9897 5 жыл бұрын
A friend of mine built a bot that did exactly that. He actually gave it full access to his PayPal credentials to purchase items. It went rogue and it bought some really weird items on its own. It bought a pink selfie stick, winter gloves, and some other totally useless stuff. Too funny.
@elmahdichaker1207
@elmahdichaker1207 3 жыл бұрын
Best teacher ever 👍🏼👍🏼👍🏼
@MrPaPaYa86
@MrPaPaYa86 3 жыл бұрын
I would have the check_price func return a boolean rather than calling the second function, makes things more clear and the project helps with scalability
CODE WITH ME: Building A Python Project And Web Scraper
20:44
Tiff In Tech
Рет қаралды 91 М.
AUTOMATE YOUR LIFE USING PYTHON - 3 Beginner Projects (tutorial)
19:42
Internet Made Coder
Рет қаралды 112 М.
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 20 МЛН
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 67 МЛН
Build A Modern Python GUI Project | Step by Step Tutorial
29:19
developedbyed
Рет қаралды 272 М.
Making an Amazon Price Tracker Using Python in Less Than 30 Lines
11:35
Python Resume Projects - You Can Finish in a Weekend
10:38
Tech With Tim
Рет қаралды 1,5 МЛН
Scraping Amazon With Python: Step-By-Step Guide
23:03
Oxylabs
Рет қаралды 29 М.
Top 18 Most Useful Python Modules
10:50
Tech With Tim
Рет қаралды 934 М.
Try My Price Monitoring Beginner Python Project
18:19
John Watson Rooney
Рет қаралды 19 М.
Web automation in python for beginners
11:02
Hitesh Choudhary
Рет қаралды 549 М.
Build A Python GUI App Tutorial
24:50
developedbyed
Рет қаралды 1,3 МЛН
How to create a Python Bot to auto-buy a GPU using Selenium Easily!
27:24
Scrape Amazon Data using Python (Step by Step Guide)
24:14
Darshil Parmar
Рет қаралды 173 М.
How many people are in the changing room? #devil #lilith #funny #shorts
00:39