i want to crawling data using python i tried tried again but it didn't work i can not found code's error i wrote code like this:
import re
import requests
from bs4 import BeautifulSoup
url='http://ift.tt/296uSKT'
html=requests.get(url)
#print(html.text)
a=html.text
bs=BeautifulSoup(a,'html.parser')
print(bs)
print(bs.find('span',attrs={"class" : "u_cbox_contents"}))
i want to crawl reply data in news
as you can see, i tried to searing this:
span, class="u_cbox_contents" in bs
but python only say "None"
None
so i check bs using function print(bs)
and i check up bs variable's contents
but there is no span, class="u_cbox_contents"
why this happing?
i really don't know why
please help me
thanks for reading.
Aucun commentaire:
Enregistrer un commentaire