Digital & Tech

Python HTML Parsing

Lama tak update blog ini. Tak terasa sudah 6 tahun usia blog ini, tepatnya bulan November tahun lalu.

Saya cuma mau masang code ini aja 😀

from lxml.html import parse doc = parse('http://www.google.com').getroot()
for link in doc.cssselect('div.metadata h1 a'): print '%s: %s' % (link.text_content(), link.get('href'))

2 thoughts on “Python HTML Parsing”

  1. Ronny
  2. aish

    selamat ulang tahun ke 6 untuk blognya mas.. hehehe

Comments are closed.