Python for Holiday Shopping - Beginner Web Scraping Coding Tutorial

preview_player
Показать описание
Thought I'd share a python program I created recently for the holidays for those that might be interested in beginner computer programming and want to find ways to automate to save time and money.

Recommended Pre-reqs:

Knowledge Level:
- Beginner Python Experience (exposure to object-oriented programming)
- Beginner HTML (tags knowledge/familiarity)

Installs:
- Python Installed
- selenium, bs4, pandas and csv libraries installed (can use pip installer)
- Visual Code Studio installed with Jupyter Notebook or similar IDE

0:00 Intro
1:38 Pre Requisites
4:13 Loading Chromedriver prior
5:41 Use Cases for this code
10:13 Scenerio Setup: Gather price data from many shopping URLs
14:52 Set up VS Code
19:54 Code: Libraries
28:21 Code: Blank lists and variables
31:13 Find HTML tags in webpage
40:37 Code: URL variable
42:01 Code: Function to scrape for HTML classes
46:17 Code: Open web browser with Chromedriver
49:47 Code: Read csv file and add to "link" list
52:51 Code: Check "link" list is populated and return size
56:26 Code: For loop to call function and populate "product" and "price" lists
1:05:33 Run the automation magic!
1:07:00 Code: Check lists - What actually happened?
1:09:32 Code: Make table and export to csv file
1:13:00 Final result!

#coding #pythontutorial
Рекомендации по теме
Комментарии
Автор

How to collect product image links, product photo gallery?

xiaofang
welcome to shbcf.ru