Web Scraping | multiple items to csv | Python & Beautiful Soup

preview_player
Показать описание
#webscraping #beautifulsoup #csv

I have coded it in real time so you can see/hear the process of writing and testing the solution as I go.

Skip to 5mins in if you just want to see me write the code, the start show me setting up the VM and restarting network connection.

Big up to 'Scraping Kung Fu' for a useful site, with no adverts.

Hope you enjoy the video,

KBO.

Code follows :

# our task is to extract available items from all the movies elements below and store them to CSV file

import requests
from bs4 import BeautifulSoup
import csv

print(response)

# parse response

# extract data
def ws():
ls = []
return ls
header = ['Title', 'Genre', 'Country','Year']
for line in ws():

Check out the Minimalist online python IDE :

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

OMG! MIND BLOWING! Dr Pi, man, I'm so exited!!! Your British humor is fantastic even though I needed to google "a number 2" joke))) I have so many things to say regarding this so it's easier to make a reaction video rather then typing numerous pages here. Reaction video is coming soon! And thank you so much - I was so happy watching this video, I don't eve know why really... I watched it ALL from the beginning to the very end because there are so many hidden humor in your video - I just didn't want to miss any. I would've subscribed to your channel again if could, thank you man, I mean really

monkey_see_monkey_do
Автор

This was great - I enjoyed the reaction video too. I'm going to try do one of the challenges too

philiphowell
Автор

Btw, did you check the solution of how to fix CSV columns shifts? The code is below my reaction video. I tried to keep your implementation as much as I could without doing things how I used to do. Really wondering how do you like it?

monkey_see_monkey_do
welcome to shbcf.ru