I have some troubles with getting the data from the website. The website source is here:
view-source:http://release24.pl/wpis/23714/%22La+mer+a+boire%22+%282011%29+FRENCH.DVDRip.XviD-AYMO
there's sth like this:
INFORMACJE O FILMIE
Tytuł............................................: La mer à boireOcena.............................................: IMDB - 6.3/10 (24)Produkcja.........................................: FrancjaGatunek...........................................: DramatCzas trwania......................................: 98 min.Premiera..........................................: 22.02.2012 - ŚwiatReżyseria........................................: Jacques MaillotScenariusz........................................: Pierre Chosson, Jacques MaillotAktorzy...........................................: Daniel Auteuil, Maud Wyler, Yann Trégouët, Alain Beigel
And I want to get the data from this website to have a Python list of strings:
[[Tytuł, "La mer à boire"]
[Ocena, "IMDB - 6.3/10 (24)"]
[Produkcja, Francja]
[Gatunek, Dramat]
[Czas trwania, 98 min.]
[Premiera, "22.02.2012 - Świat"]
[Reżyseria, "Jacques Maillot"]
[Scenariusz, "Pierre Chosson, Jacques Maillot"]
[Aktorzy, "Daniel Auteuil, Maud Wyler, Yann Trégouët, Alain Beigel"]]
I wrote some code using BeautifulSoup but I cant go any further, I just don't know what to get the rest from the website source and how to convert is to string ... Please, help!
My code:
# -*- coding: utf-8 -*-
#!/usr/bin/env python
import urllib2
from bs4 import BeautifulSoup
try :
web_page = urllib2.urlopen("http://release24.pl/wpis/23714/%22La+mer+a+boire%22+%282011%29+FRENCH.DVDRip.XviD-AYMO").read()
soup = BeautifulSoup(web_page)
c = soup.find('span', {'class':'vi'}).contents
print(c)
except urllib2.HTTPError :
print("HTTPERROR!")
except urllib2.URLError :
print("URLERROR!")
soup.findAll
– Noncontributory