beautifulTest.py 358 B

1234567891011121314
  1. # coding=utf-8
  2. '''
  3. Created on 2016年3月11日
  4. @author: ChenHao
  5. '''
  6. from bs4 import BeautifulSoup
  7. fin = open("../spider_download/initPage/1.html", "r")
  8. html_cont = fin.read()
  9. soup = BeautifulSoup(html_cont, 'html.parser', from_encoding='utf-8')
  10. print(soup)
  11. new_product_urls = set()
  12. table = soup.find("table", id="ctl00_ContentMain_SearchResultsGrid_grid")