[Tutor] Beautiful Soup

Crusier crusier at gmail.com
Tue Sep 29 17:47:02 CEST 2015


Hi

I have recently finished reading "Starting out with Python" and I
really want to do some web scraping. Please kindly advise where I can
get more information about BeautifulSoup. It seems that Documentation
is too hard for me.

Furthermore, I have tried to scrap this site but it seems that there
is an error (<http.client.HTTPResponse object at 0x02C09F90>). Please
advise what I should do in order to overcome this.


from bs4 import BeautifulSoup
import urllib.request

HKFile = urllib.request.urlopen("https://bochk.etnet.com.hk/content/bochkweb/tc/quote_transaction_daily_history.php?code=2388")
HKHtml = HKFile.read()
HKFile.close()

print(HKFile)

Thank you
Hank


More information about the Tutor mailing list