Привет Я работаю над проектом для своей школы, который включает в себя очищение HTML.Красивый суп, ничего не возвращающий
Однако я не получаю ни одного возвращенного, когда я ищу таблицы. Вот сегмент, который переживает эту проблему.
Если вам нужна дополнительная информация, я был бы счастлив дать вам это
from bs4 import BeautifulSoup
import urllib2
import datetime
#This section determines the date of the next Saturday which will go onto the end of the URL
d = datetime.date.today()
while d.weekday() != 5:
d += datetime.timedelta(1)
#temporary logic for testing when next webpage isn't out
d = "2013-06-01"
#Section that scrapes the data off the webpage
url = "http://www.sydgram.nsw.edu.au/co-curricular/sport/fixtures/" + str(d) + ".php"
page = urllib2.urlopen(url)
soup = BeautifulSoup(page)
print soup
#Section that grabs the table with stuff in it
table = soup.find('table', {"class": "excel1"})
print table
(этот комментарий не по теме) присоединиться http://chat.stackoverflow.com/rooms/6/python please :) – TerryA
Нет, я говорил, что мой комментарий отключен от темы – TerryA
Ах, ура. Не беспокойтесь :) – akkatracker