Skip to content

Instantly share code, notes, and snippets.

View nguyenhieuec's full-sized avatar

m_fx nguyenhieuec

  • Viet Nam
View GitHub Profile
import requests
from bs4 import BeautifulSoup
page = requests.get('https://tiki.vn/dien-thoai-may-tinh-bang/c1789?src=c.1789.hamburger_menu_fly_out_banner&_lc=Vk4wMjMwMDcwMTA=')
soup = BeautifulSoup(page.text, 'html.parser')
with open("tiki_page.html", mode='w') as f:
f.write(soup.prettify())
rating = soup.findAll('p', {"class": "rating"})
for p in rating: