Argparse Basics - How I run my scripts via the Command Line

preview_player
Показать описание
Argparse lets you pass in user defined arguments to you code before it runs, this is a great way to change specific parts without editing your code or taking in user input. This video covers the very basics, and is aimed at someone who has never used argparse before - there's a lot more to it than just this but I hope that this will give you a good idea of what you can achieve with it and maybe make your life a little easier when running your repeatable web scrapers.
------------------------------------
Disclaimer: These are affiliate links and as an Amazon Associate I earn from qualifying purchases
-------------------------------------

Sound like me:
-------------------------------------
Video like me:
-------------------------------------
Рекомендации по теме
Комментарии
Автор

This is the type of guide I need. Quick, easy, only the essentials.
Also a very straight forward easy example without much around it. Thx!

SirVampyr
Автор

Amazing video! Thank you so much for posting. Like others, I spent a ton of time reading confusing documentation before finding this video which is the absolute best explanation available!

Shaush
Автор

Thank you! This helped me out so much. I was stuck and couldn't get my script to work. But this helped out a lot!

evanslawrence
Автор

Nice! I've often wondered how to do this, and have hacked my way through Linux shell scripts to get around it.

Sidenote: I'm taking a data science course now, and all of your scraper tutorials have been a HUGE help in gathering initial data sets. Once again, much appreciated.

mattmovesmountains
Автор

This is a easy to understand lesson on how to use argparse to store the commandline user input and parse it into the python script!

timpanister
Автор

Hello Mate,

I just discovered you recently.

Your content is FUCKING AMAZING!

Easy to understand for begginers.

Wish you all the best!!

fr-tiktok-compilations-
Автор

Just what i was looking for, thank you.

_indrid_cold_
Автор

God I searched the entire day for a vid like this. Thank you!!!

getoutmore
Автор

I have a question: when it comes to scraping the page on which the data is updated every, say, 5 minutes, then python scrypt based on the libraries like: requests, bs, pandas would be enough to deal with it and write down an incoming data into dataframe or it will require some scrypt to manage when to activate the scraping code on the page ?

maciekpaciarski
Автор

I follow you from Egypt and I would like to tell you that your content is really useful

statement-
Автор

Hey man don't know if you remember me, learnt a lot from your scrapy and again you're saving my life here. THANKS!

GelsYT
Автор

Love the video, but would love it more with a Liverpool example

jimshapedcoding
Автор

good vid. For your next vid, can you make a vid about a more advanced application of agparse? and please upload to pastebin or something so we can play around it with it.

undertoes
Автор

Is it possible to execute the script with the arguments and also just in the normal way, like before adding argparse? How can I make the script function with both options?

chiara
Автор

what's the difference with the sys.argv ?

novianindy
Автор

Using argparse Is it possible to select the argument from the displayed list? So py file has to run first and then argument passed later!

sivaranjjan
Автор

Great video! Also, what theme is that?

alejocv
Автор

r = memory - Raam! Ancient Native AMrr.

paulhetherington
Автор

Can't get over the typo "statiums"

MccZerk
Автор

I wasted a lot of time with argparse before I found click. Then a lot more rewriting...

nathantoulbert