Writing a Python Script to Check If Any ACs Are Available Every 5 Minutes

  Рет қаралды 63,966

CS Dojo

CS Dojo

Күн бұрын

It's been ridiculously hot in Vancouver recently, and it's almost impossible to find ACs.
So I wrote a simple Python script (with Selenium) to check if any AC's are available at Best Buy every 5 minutes and mention me on Slack when there is one.
- The starter code: replit.com/@ykdojo/scraping-a...
- The complete code: replit.com/@ykdojo/scraping-a...
- A doc about always-on on Replit: docs.replit.com/hosting/enabl...
- You can get 2 months of free hacker plan with this code: csdojo2 (claim it at replit.com/claim)
- The two videos I mentioned:
The one about why you might want to switch from Webpack to Vite: • Why We Switched from W...
The one about coding bootcamps: • Ruben Harris on Career...
- Follow me on Twitter for more content: / ykdojo
- This video might be a good reference to check how to set up your own Slack bot: • Python Slack Bot Tutor...

Пікірлер: 178
@CSDojo
@CSDojo 2 жыл бұрын
Long time no see everyone! haha If you have any questions or just want to chat, feel free to join my Discord server here: csdojo.io/d EDIT - clarification: I turned off the notification of that channel so I won't be notified every time the bot sends a message. I'll only be pinged when there's a mention. I chose to send a message every time anyway just to make it easier to make sure the bot's still working.
@anitoons999
@anitoons999 2 жыл бұрын
Good morning sir. I'm from India 🇮🇳. Today is Teachers Day for us. So I wish you a Happy Teachers Day Sir 😊. You teaches us coding very well sir.
@rashidaakter1205
@rashidaakter1205 2 жыл бұрын
Javascript, html and css tutorial please. ....i am from Bangladesh..
@masternobody1896
@masternobody1896 2 жыл бұрын
best
@Hallden_
@Hallden_ 2 жыл бұрын
This was awesome man! A lot more clean code than when I do projects haha
@CSDojo
@CSDojo 2 жыл бұрын
Haha thanks!!
@abdoualpha_dz3860
@abdoualpha_dz3860 2 жыл бұрын
hey kalle
@djobama5586
@djobama5586 2 жыл бұрын
God eftermiddag Kalle
@Mahadonation1
@Mahadonation1 2 жыл бұрын
Hey Kalle, ur videos on automation are cool too
@hangout7081
@hangout7081 2 жыл бұрын
Hi dude.
@erikawwad7653
@erikawwad7653 2 жыл бұрын
just passed my data structures and algorithms class!!!!
@Asuna-chu
@Asuna-chu 2 жыл бұрын
Congrats
@erikawwad7653
@erikawwad7653 2 жыл бұрын
@@Asuna-chu thank you
@madhavsuri1759
@madhavsuri1759 2 жыл бұрын
Hi Erik where did you learn data structures and algorithms can you suggest where to learn and regarding which Language you completed DS,and algorithms
@bruce7773
@bruce7773 2 жыл бұрын
Which school ? Online ?
@bolt8129
@bolt8129 2 жыл бұрын
Great man
@ddibbles
@ddibbles 2 жыл бұрын
I know it's a bit of a silly project, but you're teaching some very valuable python skills here! I hope you continue to post regularly to this channel again!
@cookieandcream6151
@cookieandcream6151 2 жыл бұрын
These videos continue to inspire me. Thank youuuu 🥺
@CSDojo
@CSDojo 2 жыл бұрын
I was asked why I'm letting the bot spam Slack every time, and here's my answer: I turned off the notification of that channel so I won't be notified every time the bot sends a message. I'll only be pinged when there's a mention. I chose to send a message every time anyway just to make it easier to make sure the bot's still working.
@pranavi1949
@pranavi1949 2 жыл бұрын
I asked that question on your discord.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Nice video! I was playing with selenium on Replit a bit the other day works really well. I could see this video helping people set up a lot of projects like checking for the availability of GPUs or PS5s. You know the important stuff...
@dddonehoo7
@dddonehoo7 2 жыл бұрын
Some of the best and most inspirational CS content.
@themarvelgirl1382
@themarvelgirl1382 2 жыл бұрын
Thanks for all the efforts you've taken for us!
@ermalgashimramori
@ermalgashimramori 2 жыл бұрын
Great content as always! Hope you upload more!
@DontSnowMe
@DontSnowMe 2 жыл бұрын
Welcome back! I've actually been wondering how to do something like this on discord. Thank you!
@krypton9378
@krypton9378 2 жыл бұрын
I love your way of teaching..thank you so much for teaching us the easiest way possible!
@c.allmebro
@c.allmebro 2 жыл бұрын
U make so detailed python tutorials and it's helping me out a lot u are the best bro
@kailashrajendran3580
@kailashrajendran3580 2 жыл бұрын
Just now realised, I'm so early 🤣! I Always love CS Dojo ❤️
@karenyanza7721
@karenyanza7721 2 жыл бұрын
He is extremely good teaching , in every single video , i dont get confused "never" , keep it up!!!!!! 👏👏👏👏
@aydnaliyev914
@aydnaliyev914 2 жыл бұрын
These videos keep me inspired 💙 Tysm
@strategy_gal
@strategy_gal 2 жыл бұрын
Wow this is so cool! Great tutorial!
@noatak6027
@noatak6027 2 жыл бұрын
Your videos are so helpful for me. Thank you ever so much
@umumuntuksemua9831
@umumuntuksemua9831 2 жыл бұрын
Great video as always!
@slothlair
@slothlair 2 жыл бұрын
Nicely explained, thanks.
@mdshadan-7312
@mdshadan-7312 2 жыл бұрын
Great ♥️ after watching this my motivation in programming is grew
@macx8360
@macx8360 2 жыл бұрын
Honestly speaking yesterday thinking about ut Frequency of ur videos and yah here u are .
@mvpbluesky9820
@mvpbluesky9820 2 жыл бұрын
hi man i love all your video it help me a lot to learn python and others i have a question what software do you use for programing?
@hoango867
@hoango867 2 жыл бұрын
Just wanna say thanks you. Your video is great
@BrianBest
@BrianBest 2 жыл бұрын
This is timely stuff!!
@fanaticalplel1003
@fanaticalplel1003 2 жыл бұрын
Just tarted learning, this looks so advanced and complicated
@brianbrian7590
@brianbrian7590 2 жыл бұрын
BRUH, YOURE STILL ALIVE! I WATCHED YOUR OLD VIDEOS LAST MOTNH
@mehmetjohson8878
@mehmetjohson8878 2 жыл бұрын
Thank you brother
@elixpo
@elixpo 2 жыл бұрын
This is amazing 👍
@harrypulsford995
@harrypulsford995 2 жыл бұрын
The reason for the error is probably because the element has become stale in the Dom, ie its looking for the element before the page is actually in a ready state, also an easier way to locate that element would be to use xpath and locate via class contains and the text.
@thetopnotch5209
@thetopnotch5209 2 жыл бұрын
YK is back... Awesome
@samyaksanghvi3896
@samyaksanghvi3896 2 жыл бұрын
Good ! I am a professional webscraper on Fiverr. But it's all because of you. Thank you for making excellent videos ❤️ Hey, if you can please make a course on django. Thank you
@infotechyeti
@infotechyeti 2 жыл бұрын
Awesome. Thanks for the channel. You do any live streams and when?
@CSDojo
@CSDojo 2 жыл бұрын
No I don't really do live streams
@nazialateef6451
@nazialateef6451 2 жыл бұрын
Happy to see you..😊
@nijoeli
@nijoeli 2 жыл бұрын
I was feeling depressed, I haven't had enough motivation to do anything lately, but this video has given me motivation to do a similar bot and thanks to your tutorials I'm gonna be able to do it :D Thank you very much
@pile333
@pile333 2 жыл бұрын
Amazing! And some says that you can do such a thing in Python...
@JamBear
@JamBear 2 жыл бұрын
I didn't know you were in Vancouver! I can confirm it is unbearably hot.
@hoshiya4522
@hoshiya4522 2 жыл бұрын
To scrape dynamic oages with BS4 or Requests You'll need to first find the xhr on the page.. chrome dev tools is the best way to do this.. then you can just do get requests on those xhrs and you'll get your data
@abdullashafi580
@abdullashafi580 2 жыл бұрын
yay, you are back!
@muhammadsakib4711
@muhammadsakib4711 2 жыл бұрын
waiting for your javascript tutorials for beginner! I'm interested in javascript to being a web developer!
@rolandocruz1695
@rolandocruz1695 2 жыл бұрын
THE GOAT IS BACK
@oxane2722
@oxane2722 2 жыл бұрын
Wow yk you're back!
@konstantin.v
@konstantin.v 2 жыл бұрын
_print('refreshing...')_ I see what you did there 😊
@Lisa-gq7xp
@Lisa-gq7xp 2 жыл бұрын
you are a wonderful person, thank you for sharing the useful information. I'm learning about AI, looking forward to finding youtubers like you. Everyone who studies AI, do you know any other useful youtuber channels? thanks a lot .
@iconelias508
@iconelias508 2 жыл бұрын
Finally you're back ...
@Shenge93
@Shenge93 2 жыл бұрын
Man you are good teacher, can you please provide full beginner course for Python I am really understanding when you teach me those basic Python
@homamal289
@homamal289 2 жыл бұрын
I have seen all your videos on how and what you should learn first. But I’m in a situation that I can’t find enough time because I study Mathematical Statistics and now I have a chance to get a job but they prefer c++ to learn first also I’m studying c++ in my university now so I just want to know what is the best I can choose for now
@benjaminmornington9129
@benjaminmornington9129 2 жыл бұрын
I want to learn coding so I can do Cyber security so I am try to learn as much coding tips as possible so thank you for the vidz
@TECHWITHSHAFI
@TECHWITHSHAFI 2 жыл бұрын
My idol cs dojo Take my love
@easytutorial1869
@easytutorial1869 2 жыл бұрын
What should I choose between B.tech Cse with specialization in ai/ml engineering and B.tech Cse with specialization in data science?
@alphabausffs7254
@alphabausffs7254 2 жыл бұрын
hello do you know if it it possible to use spyder for doing that? Because i get this when i enter the code on spyder No module named 'selenium'
@muhammadhusaynamilaiyub6911
@muhammadhusaynamilaiyub6911 Жыл бұрын
hi im new to coding just wanna ask cause i cant find soluttion how do i print a string and a int or float together cuase when i print a int and str together it becomes error so i have to separate them
@shantosh3071
@shantosh3071 2 жыл бұрын
Pretty Good
@mustafaaljanabi4818
@mustafaaljanabi4818 2 жыл бұрын
Welcome back buddy :)
@timeboundtales1
@timeboundtales1 2 жыл бұрын
I love the vids
@devidevidevina
@devidevidevina 2 жыл бұрын
Hello what code editor you used?
@enter5mycreations3
@enter5mycreations3 2 жыл бұрын
Dude do you know source 2 programming or coding language? Because we are modding a game. Retexturing it and adding more items.
@arshpreetsingh7828
@arshpreetsingh7828 2 жыл бұрын
How can I run my python script indefinitely? Most probably by using some cloud hosting service for running scripts but what kind would be best for running these kind of python bot scripts?
@CSDojo
@CSDojo 2 жыл бұрын
I think Replit + always on is pretty good as I mentioned in the video and description
@jiberuba8856
@jiberuba8856 2 жыл бұрын
How to change the slack to email? I want to use this code please
@ac130kz
@ac130kz 2 жыл бұрын
refeshing the page in selenium works worse than loading it again for whatever reason, also it's better to use explicit polling with WebDriverWait, then there are switches to make your page load significantly faster
@LandoCalani
@LandoCalani 2 жыл бұрын
does anyone know a site for scripts like this?
@encryptedhuli9482
@encryptedhuli9482 2 жыл бұрын
Does anyone know how to make your code change the second time you run it? For example: If you run your code once it says Hello. Then if you run it again it says Whats up.
@56xdprincevaviya83
@56xdprincevaviya83 2 жыл бұрын
This is insane CS Dojo if you don't mind then I want to ask this.... (1) Which language you started first to learn coding? (2) From which platform you learned it ? Please reply me on this comment!
@CSDojo
@CSDojo 2 жыл бұрын
I think I talk about all of those here: kzbin.info/www/bejne/o3bPh3qXnZx4psk
@SciencesEducationDE
@SciencesEducationDE 2 жыл бұрын
I did the same as you, unfortunately I get the following error message when I run the second part of the code: Traceback (most recent call last): File "main.py", line 18, in client = slack.WebClient(token=os.environ['slack_token']) AttributeError: module 'slack' has no attribute 'WebClient'
@CSDojo
@CSDojo 2 жыл бұрын
Did you run pip install slackclient?
@pranavi1949
@pranavi1949 2 жыл бұрын
Did you install slackclient using pip install?
@SciencesEducationDE
@SciencesEducationDE 2 жыл бұрын
@@pranavi1949 Yes I did, even pip 3 install slackclient
@abcreation8371
@abcreation8371 Жыл бұрын
@@SciencesEducationDE Is your bug resolved? If yes please let me know how to resolve it.
@josesamuelproducoes2843
@josesamuelproducoes2843 2 жыл бұрын
Cool
@sheikhebadulkarim2599
@sheikhebadulkarim2599 2 жыл бұрын
good
@ma4534
@ma4534 2 жыл бұрын
Hello sir... How do i improve my coding in 30 days for competitive coding...... I have been trying but not able to do code properly...
@bruce7773
@bruce7773 2 жыл бұрын
Great video 👍 GitHub Co Pilot is a bit scary ? Web Developer jobs could be gone in 3 years time 😞
@CSDojo
@CSDojo 2 жыл бұрын
hmm honestly hard to tell 😅
@disrael2101
@disrael2101 2 жыл бұрын
Why u post so rarely bro? Such useful projects! Make more asap
@camn-bv3vq
@camn-bv3vq 2 жыл бұрын
What about those clases that changes everytime? I think it's anti scrapping technique used by some owner.
@CSDojo
@CSDojo 2 жыл бұрын
Hmm that might be kind of tricky to deal with. You might want to select things based on text in that case, then.
@noahtesfay2375
@noahtesfay2375 2 жыл бұрын
good job bro!
@dragongamer4753
@dragongamer4753 2 жыл бұрын
I live in georgia in the us so i already have ac but nice video
@SweetDarkViolet
@SweetDarkViolet 2 жыл бұрын
I would `copy as fetch` from the request that gets whether the order is available. Then I would do a setInterval using that fetch.
@motivation_beast3489
@motivation_beast3489 2 жыл бұрын
Sir plz about when we learn python next steps for career
@turjobennington1677
@turjobennington1677 2 жыл бұрын
i miss your videos ! come back to the youtube man
@jewell1276
@jewell1276 2 жыл бұрын
Can we use request instead of selenium Plzz help.....
@CSDojo
@CSDojo 2 жыл бұрын
You could try!
@sourdurian2839
@sourdurian2839 2 жыл бұрын
my fav youtuber heh
@leelakrishna6291
@leelakrishna6291 2 жыл бұрын
AWS or data science what to choose
@CSDojo
@CSDojo 2 жыл бұрын
Hmm not sure. You might want to try asking on Discord: csdojo.io/d
@Rocketsmemes1
@Rocketsmemes1 2 жыл бұрын
I followed you on linked in lol
@fatimabaig504
@fatimabaig504 2 жыл бұрын
Upload moreeeeee
@sarves_boreddy
@sarves_boreddy 2 жыл бұрын
Good Morning
@pick1916
@pick1916 2 жыл бұрын
damn i dont know even the half of half of what you know but I hope I can be as good as you one day
@amaltk1520
@amaltk1520 2 жыл бұрын
🥰🥰🥰🥰🥰
@Asiifee
@Asiifee 2 жыл бұрын
❤from
@Kai-uj5go
@Kai-uj5go 2 жыл бұрын
I feel like someone would be willing to take a cashapp for the product and shipping cost to send you one, only problem would be how long it takes crossing the border the heatwave might be over before it reaches you. Cool code though.
@adriangallano2232
@adriangallano2232 2 жыл бұрын
I'm so fast flash didn't see me coming.
@hangout7081
@hangout7081 2 жыл бұрын
Hi cs-dojo. Can you please continue teach python. I'm new an I learn most skill from you.
@narc7885
@narc7885 2 жыл бұрын
He has a python playlist check it out
@vepexandalali3985
@vepexandalali3985 2 жыл бұрын
Can Zoe make a video where you show how to make a wepsite plis
@dist321
@dist321 2 жыл бұрын
ahhahaah Cool coding! Did you finally get your AC?
@ticoo1977
@ticoo1977 2 жыл бұрын
Hey bro please I request to you , tell me that did you have a computer science degree
@kyle_bro
@kyle_bro 2 жыл бұрын
He have plenty in FL, ill ship you one lol
@syncopowerstations
@syncopowerstations 2 жыл бұрын
Is there a chance that you might be interested in corroborating on a new project?
@adarshsaurabh7871
@adarshsaurabh7871 2 жыл бұрын
Hey man why you posts so less videos these days I really miss you
@theawakened7739
@theawakened7739 2 жыл бұрын
YT algorithm boost
@daminichandra.0683
@daminichandra.0683 2 жыл бұрын
Do u still work for google
@CSDojo
@CSDojo 2 жыл бұрын
no I don't. kzbin.info/www/bejne/oGqtlneqecSYiZo
@daminichandra.0683
@daminichandra.0683 2 жыл бұрын
Did u ever try to make app like Facebook or twitter
@CSDojo
@CSDojo 2 жыл бұрын
@@daminichandra.0683 Hmm not quite!
@GoodBoyDanny
@GoodBoyDanny 2 жыл бұрын
But aren’t there like anti bot scripts on best uy
@CSDojo
@CSDojo 2 жыл бұрын
Clearly not 🤣
@GoodBoyDanny
@GoodBoyDanny 2 жыл бұрын
@@CSDojo I just know theres a whole market for bestbuy bots. Checkout botbroker . io lol
@pranavi1949
@pranavi1949 2 жыл бұрын
This isn't a bot per say it is just web scraping. The Anti Script checks if a bot host is on the site not we bscraping
@mateenbutt3180
@mateenbutt3180 2 жыл бұрын
result = 10//3 # Result: 3 result = -10//3 # Result: -4 why when one of operand is -ve result change as above?
@aashutoshraj2751
@aashutoshraj2751 2 жыл бұрын
You are very handsome. Thank you for this video. Very creative. 😊
@sivasankarganeshp4990
@sivasankarganeshp4990 2 жыл бұрын
your channel all video are short code of advance level how to beginners learn or any other channel or website or document link attachment please
@CSDojo
@CSDojo 2 жыл бұрын
Check my Python beginner series?
@mahsanmasroor4904
@mahsanmasroor4904 2 жыл бұрын
Please teach us c++ programming language please:)
STOP Making These Python Mistakes
19:16
Tech With Tim
Рет қаралды 112 М.
Masterclass: AI-driven Development for Programmers
8:49
Fireship
Рет қаралды 1,1 МЛН
КАК СПРЯТАТЬ КОНФЕТЫ
00:59
123 GO! Shorts Russian
Рет қаралды 3,1 МЛН
Кәріс өшін алды...| Synyptas 3 | 10 серия
24:51
Use ChatGPT to learn to code - the right way
7:19
Python Programmer
Рет қаралды 50 М.
5 Problem Solving Tips for Cracking Coding Interview Questions
19:12
What REALLY is Data Science? Told by a Data Scientist
11:09
Joma Tech
Рет қаралды 3,7 МЛН
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 3,6 МЛН
__new__ vs __init__ in Python
10:50
mCoding
Рет қаралды 204 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1 МЛН
build a meme Python website (Flask Tutorial for Beginners)
13:30
NetworkChuck
Рет қаралды 448 М.
Makefiles in Python For Professional Automation
13:43
NeuralNine
Рет қаралды 38 М.
How To Scrape (almost) ANY Website with Python
13:45
John Watson Rooney
Рет қаралды 36 М.
КАК СПРЯТАТЬ КОНФЕТЫ
00:59
123 GO! Shorts Russian
Рет қаралды 3,1 МЛН