"Hi. I 'm trying to solve this. Class the extract perfectly but the result is :" div class = " ppl_product_header "" " H1 " Memory 4 Gb Dimm 2133 Mts CL15 " / h1 " " / Div " but I need only what is between " h1 " and "" h1 "" . ie text only. can u help me ? Thank you very much"
from bs4 import BeautifulSoup
import urllib2
import time
y=0
url ="http://ift.tt/29u3jhd"
html_page = urllib2.urlopen(url)
soup = BeautifulSoup(html_page)
x=soup.find_all('div', class_='ppl_product_header')
print x
print "good bye"
Aucun commentaire:
Enregistrer un commentaire