Uploaded July 2020 | Updated November 2026, 3 hours ago
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
In this video we walk through web scraping in Python using the beautiful soup library. We start with a brief introduction to HTML & CSS and discuss what web scraping is. Next we start getting into the basics of the beautiful soup library. This includes how to load a webpage, the basic commands you need to know such as find & find_all, grabbing strings from an HTML elements, etc. The final section of this tutorial is a series of exercises where you can practice your skills. In this section we scrape a webpage for links, we learn how to scrape a table and load it into a pandas dataframe, and we see how you can scrape & download a web image. Hope you enjoy!
I’m looking into making future videos on more complex things you can do with web scraping as well as other libraries that are helpful such as Selenium & ScraPy. Subscribe to not miss those.
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
---------------------
Resources used in this video
Simple webpage: keithgalli.github.io/web-scraping/example.html
Example webpage: keithgalli.github.io/web-scraping/webpage.html
Link to source code: github.com/KeithGalli/web-scraping
Beautiful Soup Documentation: crummy.com/software/BeautifulSoup/bs4/doc
CSS Selector Reference: w3schools.com/cssref/css_selectors.asp
---------------------
Learn more about HTML/CSS
@Traversy Media HTML Crash Course: youtu.be/UB1O30fR-EE
@Traversy Media CSS Crash Course: youtu.be/yfoY53QXEnI
Codecademy: codecademy.com/catalog/language/html-css
---------------------
Video timeline!
0:00 - Intro & Video Overview
1:09 - What is web scraping?
3:51 - Introduction to HTML
Using the beautiful soup library (5:29)
6:31 - Loading in a webpage (requests library)
8:21 - Starting to scrape
9:18 - find & find_all methods
16:00 - Finding specific text/strings in our HTML (regex)
18:38 - Select method (CSS path selections)
25:55 - Grabbing the string/text from an HTML element
28:17 - Getting a property of HTML element (href, src, id, class, etc)
29:41 - Code navigation (parents, children, siblings)
Let’s practice our skills! (33:57)
35:53 - Exercise #1: Grab all social links on webpage in 3 different ways
42:09 - Exercise #2: Scrape an HTML table into a Pandas Dataframe
53:09 - Exercise #3: Grab all fun facts that contain the word “is”
57:59 - Exercise #4: Use beautiful soup to help download an image from a webpage
1:04:20 - Exercise #5: Solve the mystery challenge!!!
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Learn data skills with hands-on exercises & tutorials at Datacamp!
datacamp.pxf.io/c/3588040/1012793/13294
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
In this video we walk through web scraping in Python using the beautiful soup library. We start with a brief introduction to HTML & CSS and discuss what web scraping is. Next we start getting into the basics of the beautiful soup library. This includes how to load a webpage, the basic commands you need to know such as find & find_all, grabbing strings from an HTML elements, etc. The final section of this tutorial is a series of exercises where you can practice your skills. In this section we scrape a webpage for links, we learn how to scrape a table and load it into a pandas dataframe, and we see how you can scrape & download a web image. Hope you enjoy!
I’m looking into making future videos on more complex things you can do with web scraping as well as other libraries that are helpful such as Selenium & ScraPy. Subscribe to not miss those.
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
---------------------
Resources used in this video
Simple webpage: keithgalli.github.io/web-scraping/example.html
Example webpage: keithgalli.github.io/web-scraping/webpage.html
Link to source code: github.com/KeithGalli/web-scraping
Beautiful Soup Documentation: crummy.com/software/BeautifulSoup/bs4/doc
CSS Selector Reference: w3schools.com/cssref/css_selectors.asp
---------------------
Learn more about HTML/CSS
@Traversy Media HTML Crash Course: youtu.be/UB1O30fR-EE
@Traversy Media CSS Crash Course: youtu.be/yfoY53QXEnI
Codecademy: codecademy.com/catalog/language/html-css
---------------------
Video timeline!
0:00 - Intro & Video Overview
1:09 - What is web scraping?
3:51 - Introduction to HTML
Using the beautiful soup library (5:29)
6:31 - Loading in a webpage (requests library)
8:21 - Starting to scrape
9:18 - find & find_all methods
16:00 - Finding specific text/strings in our HTML (regex)
18:38 - Select method (CSS path selections)
25:55 - Grabbing the string/text from an HTML element
28:17 - Getting a property of HTML element (href, src, id, class, etc)
29:41 - Code navigation (parents, children, siblings)
Let’s practice our skills! (33:57)
35:53 - Exercise #1: Grab all social links on webpage in 3 different ways
42:09 - Exercise #2: Scrape an HTML table into a Pandas Dataframe
53:09 - Exercise #3: Grab all fun facts that contain the word “is”
57:59 - Exercise #4: Use beautiful soup to help download an image from a webpage
1:04:20 - Exercise #5: Solve the mystery challenge!!!
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Learn data skills with hands-on exercises & tutorials at Datacamp!
datacamp.pxf.io/c/3588040/1012793/13294
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.










![Solving 100 Python NumPy Problems! (From easy to difficult)
NumPy is a foundational library for computation in Python. In this video we walk through exercises to learn the library in a hands-on manner. We learn skills such as array creation and manipulation, working with random numbers, performing mathematical operations, handling dates, dealing with various data types, and more. Should be a lot of fun!
Link to GitHub repo: https://github.com/rougier/numpy-100
My solutions: https://github.com/KeithGalli/numpy-100
If you enjoy this video, make sure to throw it a like & subscribe if you havent already 🫡
Here is a link to the similar video I did with the Python Pandas library!
https://youtu.be/i7v2m-ebXB4?si=G3U8SRK2k2mgoQ7e
Video timeline!
0:00 - Video Overview & Code Setup
4:18 - 1.) Import the numpy package under the name np
5:15 - 2.) Print the numpy version and the configuration
6:21 - 3.) Create a null vector of size 10
9:29 - 4.) How to get the memory size of any array
15:19 - 5.) How to get documentation of the numpy add function from the command line
18:51 - 6.) Create a null vector of size 10 but the fifth value which is 1
20:03 - 7.) Create a vector with values ranging from 10 to 49
21:48 - 8.) Reverse a vector (first number becomes last)
23:20 - 9.) Create a 3x3 Matrix with values ranging from 0 to 8
24:41 - 10.) Find indices of non-zero elements from array
26:24 - 11.) Create a 3x3 identity matrix
29:35 - 12.) Create a 3x3x3 array with random values.
30:48 - 13.) Create a 10x10 array with random values and find min/max values
33:17 - 14.) Create a random vector of size 30 and find the mean value
34:57 - 15.) Create a 2d array with 1 on the border and 0 inside
40:19 - 16.) How to add a border (filled with 0’s around an existing array? (np.pad)
43:41 - 17.) Evaluate some np.nan expressions
48:32 - 18.) Create a 5x5 matrix with values 1,2,3,4 just below the diagonal
56:01 - 19.) Create an 8x8 matrix and fill it with a checkerboard pattern
1:02:35 - 20.) Get the 100th element from a (6,7,8) shape array
1:07:09 - 21.) Create a checkerboard pattern 8x8 matrix using np.tile function
1:16:22 - 22.) Normalize a random 5x5 matrix
1:24:20 - 23.) Create a custom dtype that describes a color as four unsigned bytes (RGBA)
1:29:27 - 24.) Multiply a 5x3 matrix by a 3x2 matrix (real matrix product)
1:32:54 - 25.) Given a 1D array, negate all elements which are between 3 and 8, in place
1:37:16 - 26.) Default “range” function vs numpy “range” function
1:40:25 - 27.) Evaluate whether expressions are legal or not
1:55:41 - 28.) Evaluate divide by zero expressions / np.nan type casting
1:57:48 - 29.) How to round away from zero a float array?
1:59:22 - 30.) How to find common values between two arrays?
2:00:19 - 31.) How to ignore all numpy warnings?
2:03:24 - 32.) Is np.sqrt(-1) np.emath.sqrt(-1) ??
2:05:22 - 33.) Get the dates of yesterday, today, and tomorrow with numpy
2:19:39 - 34.) How to get all the dates corresponding to the month of July 2016?
2:27:27 - 35.) How to compute ((A+B)*(-A/2)) in place (without copy)?
2:35:00 - 36.) Extract the integer part of a random array of positive numbers using 4 different methods
2:40:47 - 37.) Create a 5x5 matrix with row values ranging from 0 to 4
2:43:07 - 38.) Use generator function that generates 10 integers and use it to build an array
2:43:58 - 39.) Create a vector of size 10 with values ranging from 0 to 1, both excluded.
2:48:49 - 40.) Create a random vector of size 10 and sort it.
2:51:07 - 41.) How to sum a small array faster than np.sum?
2:54:37 - 42.) Check if two random arrays A & B are equal
2:58:48 - 43.) Make an array immutable (read-only)
3:02:14 - Puppies are great
3:03:06 - 44.) Convert cartesian coordinates to polar coordinates
3:20:37 - 45.) Create a random vector of size 10 and replace the maximum value by 0
3:23:58 - 46.) Create a structured array with x and y coordinates covering the [0,1]x[0,1] area
3:26:25 - 47.) Given two arrays, X and Y, construct the Cauchy matrix C (Cij = 1/(xi-yj))
3:34:31 - 48.) Print the min/max values for each numpy scalar type
3:36:50 - 49.) How to print all the values of an array?
3:39:23 - 50.) How to find the closest value (to a given scalar) in a vector?
I got a little tired at the end, so not doing all 100 problems in this video. Will release the next 50 problems soon!
#python #numpy
Follow me on social media!
Instagram | https://www.instagram.com/keithgalli/
Twitter | https://twitter.com/keithgalli
Learn data skills with hands-on exercises & tutorials at Datacamp!
https://datacamp.pxf.io/c/3588040/1012793/13294
Practice your Python Pandas data science skills with problems on StrataScratch!
https://stratascratch.com/?via=keith
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links. Solving 100 Python NumPy Problems! (From easy to difficult)](https://i.ytimg.com/vi/PM504XhEVCU/mqdefault.jpg)