Using the Beautiful Soup module in Python
Using the Beautiful Soup module in Python, you can scrape the web. In this video, I'll show you how to use Python's Beautiful Soup and Requests module to perform web scraping. I'll use Python to scrape the IMDB website and then load the desired data into an excel file. This program will be written from the ground up so that you can follow along.
Web scraping is the process of collecting data from a website using a computer application. Using the Beautiful Soup and Requests modules in Python, we can easily construct programs to scrape websites. The Requests module may be used to access a specific website, while the Beautiful Soup module can be used to parse the website's HTML source code. Beautiful soup makes it simple to parse HTML content and then offers a variety of techniques for extracting data from any HTML elements. Because all websites are written in HTML, our application must read the HTML text in order to execute web scraping.
In this video, we will write a Python program that will access the IMDB website, retrieve the top rated movies from the IMDB website, and then load this data into an excel file to demonstrate the idea of web scraping using BeautifulSoup in Python.
Although the IMDB website offers movie ratings, we are only interested in extracting the top rated movies of all time for our software.
I'll be using the openpyxl module to load data into an excel file. It is quite simple to create a new excel file, modify the sheet name, and then import data into the excel file using openpyxl. I won't go into great depth about openpyxl; instead, I'll cover enough to understand how to generate an excel file and then load data into it.
Using the pip installer, we'll install the Requests and Beautiful Soup modules. Because I'm using a Mac, the command to execute from the terminal is "pip3 install module name." If you're using Windows, use the command "pip install module name" to perform the pip install command from the command prompt.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Using the Beautiful Soup module in Python», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.