During my entrepreneurial adventure (with the cultural agenda), I had to regularly update new events. A tedious task that could be partly automated. So, I had asked a quote for web scrape events published on cultural agendas.
Knowing that I was comfortable with HTML and CSS with some basics in Python, one of the developers told me that I should be able to « easily » scrape most agendas. But i have to confess, it was too new for me, my time was running out, and I had other tasks to do, so I gave up the idea (maybe too quickly).
A year has passed since and my progress in Python changed the game. What seemed too far to me at this time was now enjoyable. A lovely feeling!
Web scraping movies on Allociné
Regularly, I consult the last DVD releases on Allociné. So i wanted to list all these films with: title, press rating, spectators rating, actors, summary, url.
This is a first webscraping exercise, and yes it was really fun to do!
0. Import BeautifulSoup library
# Import Librairies import requests from bs4 import BeautifulSoup import pandas as pd import numpy as np
1. Collect datas from the url
# create the list movie_cards, with as many nested lists as pages pages = 25 url_param = 'http://www.allocine.fr' fill_val = '' movies_cards = [] for page in range(pages): url = f'http://www.allocine.fr/dvd/meilleurs/?page={page}' r = requests.get(url) allocine = BeautifulSoup(r.text, 'lxml') cards = allocine.find_all('div', class_='entity-card-list') movies_cards.append(cards)
2. Process datas
# fill our movie lists movie_title = [] movie_url = [] movie_acteurs = [] movie_resume = [] movie_presse = [] movie_spectateurs = [] movie_amis = [] for pages in movies_cards: for card in pages: # add movies title movie_title.append(card.find('a', class_='meta-title-link', href=True).text) # add movies url movie_url.append(url_param + card.find('a', class_='meta-title-link', href=True)['href']) # add movies actors if 'meta-body-actor' in str(card): actors_blocs = card.find('div', class_='meta-body-actor').text.splitlines() actors_list = [] for list_elements in actors_blocs: m = list_elements.strip() if m != '' and m != 'Avec': actors_list.append(m) movie_acteurs.append(' '.join(actors_list)) else: movie_acteurs.append(fill_val) # add movies resume if 'content-txt' in str(card): movie_resume.append(card.find('div', class_='content-txt').text.strip()) else: movie_resume.append(fill_val) # add press, spectators and friends movie ratings if 'rating-item' in str(card): rating = card.find_all('div', class_='rating-item') i = 0 tour = 1 for elmt in rating: # we have to analyse each blocs separatly (cause same span/div class names) if tour%3 == 1: if 'Presse' in str(rating[i]): u = elmt.find_all('span', class_="stareval-note")[0].text movie_presse.append(u) else: movie_presse.append(fill_val) tour += 1 if tour%3 == 2: if 'Spectateur' in str(rating[i]): v = elmt.find_all('span', class_="stareval-note")[0].text movie_spectateurs.append(v) else: movie_spectateurs.append(fill_val) if tour%3 == 0: if 'Amis' in str(rating[i]): v = elmt.find_all('span', class_="stareval-note")[0].text movie_amis.append(v) else: movie_amis.append(fill_val) i += 1 tour += 1 else: movie_presse.append(fill_val) movie_spectateurs.append(fill_val) movie_amis.append(fill_val)
3. Group lists into a dataframe
# create our dataframe allocine_recent_movies = pd.DataFrame( {'Title': movie_title, 'Press Rating' : movie_presse, 'Spectator Rating' : movie_spectateurs, 'Actors': movie_acteurs, 'Resume' : movie_resume, 'Allociné URL' : movie_url }) # set full display on texts pd.set_option('display.max_colwidth', -1) # let's take a look allocine_recent_movies.head()
4. Export datas
# dataframe to HTML allocine_recent_movies.to_html('.../190814_allocine_recent_movies.html') # dataframe to CSV allocine_recent_movies.to_csv('.../190814_allocine_recent_movies.csv')
Here is the HTML file (scraping done the 14th august 2019). 374 films, nice job BeautifulSoup!
Hope this post can be useful for you. Feel welcome to share your webscraping code in the comments!
- - -
antibioticsIsoge
Special offer for antibiotics: can you buy antibiotics online and get discount for all purchased! Two free pills (Viagra or Cialis or Levitra) available with every order. No prescription required, free delivery.
MichaelUnpax
Antibiotics Online – Special offer: Save up to $498 – buy antibiotics online and get discount for all purchased!
bahis siteleri porn
vurcazkircazpatliycaz.C9f7Nn87Of3F
mature porn
https://www.wilsonlearning.com/?URL=karlmarc.com/
instructorships
instructorships xyandanxvurulmus.1oiq5SQXHT0R
bahis siteleri
bahis siteleri
bahis siteleri
Güvenilir bahis siteleri arasında popüler ve Kazançlı bahis deneyimi için en iyi bahis sitelerini keşfedin. Güvenli ve eğlenceli bahis keyfi burada.
bahis listesi
Discover the best betting sites for a popular and profitable betting experience among reliable betting sites.
tipobet
tipobet
BryanHeefs
Thanks for magnificent info. What trips can you recommend in 2024? Astro tourism, eco diving, home swapping, train stations are the new food destinations,sports tourism, coolcationing, gig tripping, private group travel?
porn watch
child porn sex
child porn
child porn sex
色情手表
child porn sex
fuck google
bastan sona ta ta ta ananin amina kadar
российское порно
very nice post admin
bahis siteleri
bahis siteleri
porn
mature porn
SerkanKardes
teen porn
xnxx
teen porn
child porn
https://onlinecasinomaldives.org/
porn
https://adaxbetgiris.com/
porn
https://onlinecasinomaldives.org/
child porn
thank you admin very nice blog
Deneme bonusu veren siteler
Deneme bonusu veren siteler boyle kahpe gormedi
sex porn
fixbet porn sex
ポルノを見る
tipobet porn sex
gab
The company has never elaborated on why this move was taken, although it did occur not long after Titan Poker threatened to pull out of the Canadian market. That may be completely coincidental, but it means that Skrill is no longer an option for Canadian online poker players or casino users. Not only does Skrill keep your bank information separate from online casinos and other sites, but it also functions with real time, instant transactions. That’s why many players opt for Skrill and other e-wallets when it comes to banking at online casinos. Why you should play at 4Crowns CasinoA £5,000 welcome bonus spread out across your first seven deposits, plus 450 extra spins!More than a thousand of the highest-quality games from the industry’s most fantastic studios.There is a good selection of quick and easy payment options.This is possibly one of the best UK online casinos.A crew dedicated to providing customer support is available around the clock.6. My Stake Top UK Online Casino for Casino + Bookie
https://www.coloradosportsguys.com/category/poker/page/7/
We love a top VIP program that treats high rollers well, but that’s not the only casino bonus to look out for. Our top high-roller casinos in the UK also have great welcome bonuses and reload bonuses to keep that bonus cash flowing. Although Boku is an excellent payment method, few Boku casino sites are available. However, you can be sure that the ones in our list of top deposit by Boku casino sites are high-quality and safe for UK players. High rollers and low rollers can enjoy all their favourite games without any worries like classic card games at Boku blackjack sites. Browse the entire Casino Guru casino database and see all casinos you can choose from. If you want to leave your options open, this is the right list of casinos for you. It might take you longer to find the best option though.
смотреть порно
child porn
vegas glass porn
You can even sign up for a see-through version with Vegas Glass Kayaks.
Laurene
I am no longer certain where you’re getting your information,
but good topic. I needs to spend a while learning much more or working out more.
Thanks for magnificent info I was searching for this info
for my mission.
user-198966
awesome
hd porn 4k download
http://www.porn video download gghkyogg.xtmKCWZhEXg
sexy video 4k download
porn vedio full ggjennifegg.SYwIdolojJp
pornky.com
free hd pourn ggjgodherogg.x9oEBpVNuLy
https://netcallvoip.com/wiki/index.php/Unlock_the_Power_of_Eucalyptus_Crucial_Oil:_Major_Techniques_for_Optimal_Use_33473
We are a gaggle of volunteers and starting a brand
new scheme in our community. Your website offered us with helpful information to work
on. You’ve performed an impressive task and our entire neighborhood
shall be thankful to you.
fashionflag sexy video download 4k
fashionflag best free pron fashionflag.2DYEviEryHS
goodhere Orgy porn
goodhere Russians porn vurucutewet.8LDKH40pCdm
ladyandtherose Hentai, Anime porn
ladyandtherose Vintage porn backlinkseox.hIIo6827cVn
jenniferroy 妊娠中のポルノ
jenniferroy 集団セックス japanesexxporns.X0o13GSgl5N
S'inscrire sur Binance
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
is gate io safe reddit
Reading your article helped me a lot and I agree with you. But I still have some doubts, can you clarify for me? I’ll keep an eye out for your answers.
एमआईएलए अश्लील
समलैंगिक अश्लीलता txechdyzxca.wV1hyGKPX96
शौकिया अश्लीलता
बुत अश्लील साहित्य है hkyonet.DzgaqLS0lWm
milf ਪੋਰਨ
ਗੇ ਪੋਰਨ madisonivysex.4tHUg9LWuBV
Binance
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
ladesbet ਏਸ਼ੀਆਈ ਪੋਰਨ
ladesbet ਮਰਦ ਹੱਥਰਸੀ ਪੋਰਨ ladesinemi.qQBe58dg2d4
ladesbet ラティーナポルノ
ladesbet フィスティングポルノ ladestinemi.LuXtaifxeRi
вдкрити акаунт на бнанс
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
RAHAT YOK SIZE ARTIK
kurdish porn
Реферальный код binance
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.
Lilibet bonus
For de beste tipsene om Casino i Norge og spennende spillanmeldelser, bes�k kasinoekspert.com i dag!
Casino Bonus Ved Registrering
Topnorgecasino.com gir deg den mest omfattende oversikten over Norske Casino p� nett, slik at du kan velge de beste spillene og kasinoene for en uforglemmelig spillopplevelse.
Norske Casino Bonuser
Utforsk spennende Norge Casino-opplevelser og de nyeste spillene p� norgecasino.org for en fantastisk tid med online gambling
Beste spilleautomater
For de beste tilbudene og spillopplevelsene p� et Norsk Casino, bes�k betbonuser.com og utforsk et bredt utvalg av bonuser og spillalternativer.
Lilibet Gameshow
For den beste Lilibet opplevelsen i Norge, bes�k lilibetcasino.org og utforsk et bredt utvalg av spennende spill og tilbud.
Lilibet Mobil
For den beste Lilibet opplevelsen i Norge, bes�k lilibetcasino.org og utforsk et bredt utvalg av spennende spill og tilbud.
Lilibet velkomstbonus
For den ultimate Lilibet-opplevelsen i Norge, bes�k lilibetbonus.com og utforsk et bredt utvalg av spennende spill og eksklusive tilbud
Lilibet Odds
For den beste Lilibet-opplevelsen i Norge, bes�k lilibetnorge.com og utforsk et bredt utvalg av spennende spill og eksklusive tilbud.
Casino Norge
Utforsk spenningen av online gambling i Casino Norge med de beste anbefalingene fra bestecasinonorge.net
Nye casino
Utforsk spenningen av online gambling i Casino Norge med de beste anbefalingene fra bestecasinonorge.net
Lilibet anmeldelse
For de nyeste spillnyhetene og innsikten i casinoverdenen, sjekk ut Lilibet Blogg p� blog.lilibet.com/no/.
Lilibet betalingsmetoder
For an exciting Lilibet Casino experience, visit lilibet-casino.org and explore a wide range of thrilling games and exclusive offers
Sultanbet Casino Willkommensbonus
Bei Sultanbet k�nnen Sie eine Vielzahl von Spielen genie�en. Dar�ber hinaus finden Sie auf sultanbetcasino.net aktuelle Informationen f�r weitere Einblicke.
Sultanbet Live Casino
Bei Sultanbet k�nnen Sie eine Vielzahl von Spielen genie�en. Dar�ber hinaus finden Sie auf sultanbetcasino.net aktuelle Informationen f�r weitere Einblicke.
Sultanbet Casino Willkommensbonus
Bei Sultanbet k�nnen Sie eine vielf�ltige Auswahl an Spielen genie�en. Dar�ber hinaus bietet blog.sultanbet.com/de/ umfassende Informationen und Einblicke rund um das Casino.
Sultanbet Live Casino
Bei Sultanbet k�nnen Sie eine vielf�ltige Auswahl an Spielen genie�en. Dar�ber hinaus bietet blog.sultanbet.com/de/ umfassende Informationen und Einblicke rund um das Casino.
Neue Online Casinos
Sie k�nnen das beste Spielerlebnis im Online Casino Deutschland erleben. Au�erdem finden Sie auf onlinecasino-deutschland.net aktuelle Bonusangebote und Spieloptionen.
Sportwetten Anbieter
Im Online Casino Deutschland finden Sie unterhaltsame und gewinnbringende Spiele. Zudem k�nnen Sie auf neue-onlinecasinos.net die neuesten Online-Casino-Optionen entdecken.
Online Casino Boni
Bei Sportwetten Deutschland k�nnen Sie auf spannende Sportereignisse wetten und Ihre Gewinnchancen erh�hen. Dar�ber hinaus finden Sie auf beste-wettanbieter.net die besten Wettanbieter und lukrative Wettangebote.
Sultanbet Sportwetten
Bei Sportwetten Deutschland k�nnen Sie auf spannende Sportereignisse wetten und Ihre Gewinnchancen erh�hen. Dar�ber hinaus finden Sie auf beste-wettanbieter.net die besten Wettanbieter und lukrative Wettangebote.
Sportwetten Anbieter
Im Online Casino Deutschland k�nnen Sie eine breite Palette von Casinospielen erleben. Weiterhin bietet casinoonlinedeutschland.org umfassende Informationen �ber Online-Casinos und ihre Angebote.
Deutsche Online Casinos
Im Online Casino Deutschland k�nnen Sie eine breite Palette von Casinospielen erleben. Weiterhin bietet casinoonlinedeutschland.org umfassende Informationen �ber Online-Casinos und ihre Angebote.
Sultanbet VIP
Bei Sultanbet k�nnen Sie eine vielf�ltige Auswahl an Spielen erleben. Weiterhin finden Sie auf sultanbet-casino.com umfassende Informationen �ber das Casino und seine Dienstleistungen.
Sultanbet Live-Wetten
Bei Sultanbet k�nnen Sie eine vielf�ltige Auswahl an Spielen genie�en. Dar�ber hinaus bietet sultanbet-bonus.net umfassende Informationen �ber die Bonusangebote des Casinos.
Canl� bahis
Ma� esnas�nda bahis yapabilece�iniz ve oranlar�n anl�k olarak de�i�ti�i canl� bahis sayfas�nda siz de favori ma��n�z�n getirdi�i heyecana ortak olabilirsiniz.
Bonus veren bahis siteleri
Deneme bonusu veren siteler 2024 nas�l bulunur ve g�ncel deneme bonusu listelerine nas�l ula��l�r sorular�na sitemizde cevap bulabilirsiniz
Sportotobet giri�
Supertotobet ile �ans�n�z�n Mobildeki Adresi: Supertotobet.mobi, Kazanma Heyecan�n� Cebinizde Ya�ay�n
Sportotobet g�ncel giri�
Sportotobet ile Spor Bahislerinde Yeni Bir Boyut: Superotobetyenigiris.org ile An�nda Kazanmaya Ba�lay�n!
Restbet canl� ma� izle
Restbet ile Bahis Heyecan� Dorukta, Resbet1.org ile G�venli Giri� Yap�n ve Kazanmaya Ba�lay�n!
Restbet g�ncel
Restbet ile Bahis Heyecan� Dorukta, Resbet1.org ile G�venli Giri� Yap�n ve Kazanmaya Ba�lay�n!
Sportotobet yeni giri�
Sportotobet, spor bahisleri ve �evrimi�i casino oyunlar� sunan bir platformdur. Geni� bir spor bahisleri yelpazesi ve �e�itli liglerde y�ksek oranlarla bahis yapma imkan� sunar.
Supertotobet giri�
Supertotobet, �e�itli online bahis ve casino oyunlar� sunan g�venilir bir platformdur. Geni� spor bahisleri se�enekleri, canl� casino deneyimi ve pop�ler slot oyunlar� ile kullan�c�lar�na heyecan verici bir oyun ortam� sunar.
Betpas
Betpas, �e�itli spor bahisleri ve casino oyunlar� sunan bir online bahis platformudur. Kullan�c�lar�na geni� bir spor bahisleri se�ene�i sunman�n yan� s�ra, pop�ler casino oyunlar� ve canl� casino deneyimi de sunar.
Betpas �yelik
Betpas, spor bahisleri ve �evrimi�i casino oyunlar� sunan bir �evrimi�i bahis platformudur. Kullan�c�lar�na geni� bir spor bahisleri yelpazesi sunman�n yan� s�ra, pop�ler casino oyunlar� ve canl� krupiyelerle oynanan oyunlar da sunar.
Betist com giri�
Betist, �e�itli spor bahisleri ve �evrimi�i casino oyunlar� sunan bir �evrimi�i bahis platformudur. Geni� bir spor bahisleri yelpazesi sunarken, pop�ler casino oyunlar� ve canl� casino deneyimini de sa�lar.
Mariobett
Mariobet, �e�itli spor bahisleri ve �evrimi�i casino oyunlar� sunan bir �evrimi�i bahis platformudur. Kullan�c�lara geni� bir spor bahis se�ene�i sunman�n yan� s�ra pop�ler casino oyunlar� ve canl� casino deneyimi de sa�lar.
Betist giri� 2024
Betist, çeşitli spor bahisleri ve çevrimiçi casino oyunları sunan bir çevrimiçi bahis platformudur. Geniş bir spor bahisleri yelpazesi sunarken, popüler casino oyunları ve canlı casino deneyimini de sağlar. Yüksek oranlar ve çeşitli liglerde bahis yapma imkanı sunar.
Tipobet365
Tipobet, çeşitli spor bahisleri ve çevrimiçi casino oyunları sunan bir çevrimiçi bahis platformudur. Geniş bir spor bahisleri yelpazesi sunarken, aynı zamanda popüler casino oyunları ve canlı casino deneyimini de sağlar.
Betpublic 2024
Betpublic giriş sayfasına Twitter yani X üzerinden bu hesap üzerinden ulaşabilirsiniz. Twitter güncel, sorunsuz, hızlı ve güvenilir giriş adres burada yer.
Betpublic
Betpublic güncel giriş ekranına, bu sayfamız üzerinden betmatik giriş yapabilirsiniz. Yer alan link üzerinden güncel, yeni, sorunsuz ve hızlı giriş ekranına.
binance Registrácia
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
smorter giremal
hello there and thank you in your information – I have certainly picked up anything new from right here. I did then again experience several technical points the usage of this web site, as I experienced to reload the website a lot of times prior to I may just get it to load properly. I have been thinking about in case your web host is OK? Not that I am complaining, however slow loading circumstances occasions will sometimes impact your placement in google and can damage your quality score if advertising and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I am including this RSS to my email and could glance out for much more of your respective interesting content. Ensure that you update this again soon..
smorter giremal
I don’t ordinarily comment but I gotta tell appreciate it for the post on this great one : D.
Deneme Bonusu Veren Siteler 2024
Kaçak bahis siteleri yaptıkları promosyonlarla yeni üye elde etmeyi amaçlamaktadırlar. Türk sitelerinin en büyük özelliği sundukları deneme bonuslarıdır
Bahis siteleri 2024
Deneme bonusu ve güvenilir bahis siteleri ile bizimle en iyi oranlarla canlı bahis yapın. 2024’ün öncü deneme bonusu veren sitelerini keşfedin.
porn tamaiti taiohi z
child teen porn
zvinonyadzisira zvevechidiki
xnxx
創建免費帳戶
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.
OrenP
I was looking through some of your blog posts on this site
and I think this site is real informative! Keep posting.Money from blog
o'smirlar uchun porno
child porn
owlpedia.org
I’m extremely impressed with your writing skills
and also with the layout on your weblog. Is this a
paid theme or did you modify it yourself?
Anyway keep up the excellent quality writing, it’s
rare to see a great blog like this one nowadays.
https://www.giantbomb.com/profile/ryalasdutv/
Good day I am so thrilled I found your blog, I really found you by mistake, while I
was searching on Yahoo for something else, Anyhow I am here now and would just like to say many thanks for a remarkable post and a all round entertaining blog
(I also love the theme/design), I don’t have time to browse it all at the minute but I have
book-marked it and also added in your RSS feeds, so when I have time I will be back to read a great deal more, Please
do keep up the fantastic b.
подростковое порно
child porn
referencia de Binance
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
betturkey
betturkey
zoritoler imol
This design is incredible! You certainly know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Fantastic job. I really enjoyed what you had to say, and more than that, how you presented it. Too cool!
binance тркелгсн жасау
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
zoritoler imol
Magnificent web site. A lot of helpful information here. I?¦m sending it to some friends ans additionally sharing in delicious. And naturally, thank you to your sweat!
бнанс реферальна програма
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
binance registrácia
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
leanbiome
I don’t normally comment but I gotta admit appreciate it for the post on this perfect one : D.
Theresa.J
You have mentioned very interesting details! ps nice web site.Blog monetyze
Selena Dunneback
Very excellent info can be found on web blog.
hire a hacker for snapchat
This design is steller! You most certainly know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Great job. I really loved what you had to say, and more than that, how you presented it. Too cool!
Alba
Simply desire to say your article is as astonishing.
The clarity in your post is just excellent and i can assume you are an expert
on this subject. Fine with your permission allow me to grab your feed to keep up to date
with forthcoming post. Thanks a million and please carry on the
enjoyable work.
moonwlkr gummies
You should participate in a contest for among the best blogs on the web. I will recommend this site!
स्पैम भेजने से बचें
lamerler olmez
स्पैम भेजने से बचें
lamerler olmez
travel blog name generator
great put up, very informative. I wonder why the opposite experts of this sector do not notice this. You must proceed your writing. I am confident, you’ve a great readers’ base already!
P28s navigation lamp
I like what you guys are up too. Such clever work and reporting! Keep up the superb works guys I have incorporated you guys to my blogroll. I think it will improve the value of my website 🙂
hire a hacker for cell phone
Valuable info. Lucky me I found your site by accident, and I’m shocked why this accident did not happened earlier! I bookmarked it.
Sight Care
It is in point of fact a nice and useful piece of information. I am happy that you simply shared this helpful information with us. Please keep us up to date like this. Thanks for sharing.
kulisbet güncel adres
be to be admins love
Ремонт телефонов
Профессиональный сервисный центр по ремонту сотовых телефонов, смартфонов и мобильных устройств.
Мы предлагаем: сервис по ремонту смартфонов
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
prodentim review
Hello there, just became aware of your blog through Google, and found that it is really informative. I’m going to watch out for brussels. I will appreciate if you continue this in future. A lot of people will be benefited from your writing. Cheers!
binance Empfehlung
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
terapi anlamı nedir ?
admin terapi ne demek ?
hire a hacker pro
I truly appreciate this post. I’ve been looking all over for this! Thank goodness I found it on Bing. You’ve made my day! Thank you again
banel kelime anlamı nedir ?
hello admin, banel ne demek
Ahlas Ne Demek ?
admin ahlas ne demek
Kurra Hafız Ne Demek ?
helloas asdmin vesselam ne demek
solucan blog
admin how adress yout
Dentavim
Good day! This is my 1st comment here so I just wanted to give a quick shout out and say I really enjoy reading through your blog posts. Can you recommend any other blogs/websites/forums that deal with the same subjects? Appreciate it!