How I run my Python scripts everyday in the cloud

  Рет қаралды 10,055

John Watson Rooney

John Watson Rooney

Күн бұрын

Check Out ProxyScrape here: proxyscrape.co...
➡ WEB
johnwr.com
➡ COMMUNITY
/ discord
/ johnwatsonrooney
➡ PROXIES
proxyscrape.co...
➡ HOSTING (Digital Ocean)
m.do.co/c/c7c9...
If you are new, welcome. I'm John, a self taught Python developer working in the web and data space. I specialize in data extraction and automation. If you like programming and web content as much as I do, you can subscribe for weekly content.
⚠ DISCLAIMER
Some/all of the links above are affiliate links. By clicking on these links I receive a small commission should you chose to purchase any services or items.
This video was sponsored by ProxyScrape.

Пікірлер: 44
@hugohoyzer2202
@hugohoyzer2202 5 ай бұрын
super slick! been following you since a year now. your content and skill is evolving constantly. its hard to be able to keep up with you :D
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
hey thanks a lot! really appreciate it
@skillswithsid
@skillswithsid 4 ай бұрын
Loving the content John, keep em coming.
@graczew
@graczew 5 ай бұрын
Hehe finally get that "devops" for scrap the world. Good job as always. If I get this film year ago this will save me many hours. However this is perfect guide for someone who want to run scraper in cloud.
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
Hah yeah I know, thanks
@Levy957
@Levy957 5 ай бұрын
love your content!
@guruware8612
@guruware8612 5 ай бұрын
14:20 - about that 2>&1... 1 is the file descriptor for stdout (which is the default when using some command >> outfile) descriptor 2 is stderrr where the errors (usually) go, "usually" because some coders are too lazy, they output everything to stdout by using printf(...) instead of using fprintf(stderr, ...) for error output by 2>&1 you are redirecting stderr to stdout and errors go to you log - messages AND errors you could do something like 2 > error.log to get a separate error-logfile
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
thank you for clarifying, I knew I wasn't quite right with that, and also that I just did it because that's how I was shown!
@milosZcr
@milosZcr 5 ай бұрын
Cool. I think you (or your viewers) may also want to explore Functions product that D.O .offers. I see that you can also use cron-like features to run the python (or other languages) code. Just like GCP (cloud functions) there is a free layer, so you can run many runs before they start to charge you. But, in this case, for the log file thing, I guess you would also have to buy D.O. storage to store that file there. I see its $5 / mo for 250GB, which would be good if all functions one manages need much more than the basic droplets 10GB. I have to say the method of doing this a bit more manually like you are showing us, does offer much more flexibility about what you can do, and how to do it. I am more a GCP guy, so I will sure also try your method, depending on the use case I have. Thanks for the good info, as usual. Cheers
@dinobaurier5934
@dinobaurier5934 2 ай бұрын
Don‘t know about zsh but usually you can just type „cd“ to navigate to the users home dir. Also, at apt install if it asks for Y/n the capital letter is the default. So you can just press Enter if the Y is capitalized.
@cursoderobotica
@cursoderobotica 5 ай бұрын
Good video!! Thank you for share!! 😁👍
@majestif
@majestif 5 ай бұрын
Many thanks for an amazing tutorial! It would be great to see how to push logs to a remote service like Sentry.
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
Cool suggestion, I'll have a look and see if I can do a follow up
@oludelehalleluyah6723
@oludelehalleluyah6723 5 ай бұрын
Wow... I've learnt something new that I'll use with another project
@oludelehalleluyah6723
@oludelehalleluyah6723 5 ай бұрын
I've really learnt a lot from you... Thank you
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
Thanks for watching
@oludelehalleluyah6723
@oludelehalleluyah6723 5 ай бұрын
@@JohnWatsonRooney I'll love if you can share your neovim setup... There are a lot out there but I'm sure if you make one, it'll be different
@azamatbagatov6858
@azamatbagatov6858 5 ай бұрын
Great video! The videos you make are so much more transparent than other coding channels who just assume familiarity with this and that technology. (I’ve been watching for years and this is the first time I’ve commented!) Been running very similar workflows to this and Digital Ocean seems so much easier and cheaper than EC2, etc. Ansible is also great for automating the command lines, installs, etc. and gives full reproducibility if you want to set up multiple similar instances. One question: where do you recommend keeping your object store and/or SQL database for storing the scraped data? On something backed up by Digital Ocean, or your local machine, or a server in your homelab, or…? Cheers!
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
thanks! for my own projects I have most stuff on my home server, but for other work I usually just use a managed DB on Digital Ocean. It;s just easier to not have to think about it or worry.
@domitorid177
@domitorid177 3 ай бұрын
Use "tail" for watching logs. Instead of "cat". That way you would get a live log.
@JohnWatsonRooney
@JohnWatsonRooney 3 ай бұрын
Thanks, old habits die hard
@thghtfl
@thghtfl 5 ай бұрын
thanks for the video mate! one question after watching this though: why didn’t you wrap all that up in a docker composer to set up your environment quickly?
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
I wanted to keep it as simple as possible for those who haven't got this far yet
@Grizzler231
@Grizzler231 5 ай бұрын
How to combine scrapy with selenium
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
There’s a scrapy selenium package on pypi, and on the GitHub repo one of the issue reports shows how to update it to work
@talhairfan4492
@talhairfan4492 5 ай бұрын
What about Selenium bots?
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
I usually use selenium grid hosted and remote connect to it but it’s not something I do very often. You can run headless chrome on a vps too, via docker or similar
@talhairfan4492
@talhairfan4492 5 ай бұрын
@@JohnWatsonRooney Thanks, there are many websites that I cannot scrape sometimes in headless approach. There are no APIs or any hidden JSONs either to scrape them from. An open browser is the only solution, seems to me.
@Divyv520
@Divyv520 5 ай бұрын
Hey john , really nice video ! I was wondering if I could help you with more Quality Editing in your videos and also make a highly engaging Thumbnail and also help you with the overall youtube strategy and growth ! Pls let me know what do you think ?
@JohnWatsonRooney
@JohnWatsonRooney 5 ай бұрын
Hey as much as I’d like an editor etc my channel doesn’t earn enough to pay for that I’m afraid
@atulraaazzz2931
@atulraaazzz2931 5 ай бұрын
Good sir🎉🎉
@MrZinchyk
@MrZinchyk 5 ай бұрын
Question: if you frequently work with similar tasks, why not make a Bash script?
@abiodun6897
@abiodun6897 5 ай бұрын
i use screen to manage multiple instances
@femisuccess124
@femisuccess124 16 күн бұрын
Is the name screen?
@Archepter
@Archepter 5 ай бұрын
My man, cron jobs to run scripts exist since the 80's , way before the cloud. I have never heard anyone running daily scripts from their PC manually, wth?!?!?
@nuel_d_dev
@nuel_d_dev 5 ай бұрын
lol...so you don't know people convert their scripts to bat files and run cron locally 😅
@personofnote1571
@personofnote1571 5 ай бұрын
You never run locally? Just debug straight in prod? Now THAT is from the 80s 😂
@Archepter
@Archepter 5 ай бұрын
@@nuel_d_dev I'm assuming you aren't running your product on your home laptop, of course I mean on whatever servers you have available.
@thghtfl
@thghtfl 5 ай бұрын
⁠​⁠@@personofnote1571read again, he never runs them manually
@naradakandawala4278
@naradakandawala4278 5 ай бұрын
Great ❤
@sitrakaforler8696
@sitrakaforler8696 5 ай бұрын
haah yes !
@obiwanfisher537
@obiwanfisher537 3 ай бұрын
Hm. Linux.
@RonnyNussbaum
@RonnyNussbaum 5 ай бұрын
“Every day”, not “everyday”.
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 214 М.
Is this how pro's scrape HUGE amounts of data?
20:34
John Watson Rooney
Рет қаралды 7 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
I built a computer that CAN'T break - Proxmox Clustering
18:49
Linus Tech Tips
Рет қаралды 1,4 МЛН
Linus Torvalds: Speaks on Hype and the Future of AI
9:02
SavvyNik
Рет қаралды 328 М.
NVIDIA CEO Jensen Huang's Vision for Your Future
1:03:03
Cleo Abram
Рет қаралды 272 М.
Hacking Windows TrustedInstaller (GOD MODE)
31:07
John Hammond
Рет қаралды 896 М.
Python Virtual Environment and pip for Beginners
30:39
Dave Gray
Рет қаралды 37 М.
This is How I Scrape 99% of Sites
18:27
John Watson Rooney
Рет қаралды 257 М.
Scrape more with this simple change
17:37
John Watson Rooney
Рет қаралды 8 М.
Learn Docker NOW!  From Hello World to Doom in 15 Minutes!
16:41
Dave's Garage
Рет қаралды 209 М.
How To Use Proxies with Python (requests + playwright)
10:51
John Watson Rooney
Рет қаралды 4,3 М.
I failed in the last video....but this time 😁
37:11
NetworkChuck
Рет қаралды 177 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН