Introduction
pip install pyquery
Sample code
# -*- coding: utf-8 -*-
from pyquery import PyQuery as pq
url = "http://www.sicafe.net/macPackageManageTips/html/homebrewPythonInstall.html"
query = pq(url)
for a in query.find("a"):#CSS selector! !!
print pq(a).text()
#Output result
#Omission
#Mac OS X Lion /Prepare python environment with homebrew
#point
#procedure
#1.Update brew and install python
#2.Reinstall pip
#3.Cleaning the old environment and changing the path
#4.Try reinstalling sphinx or something
#5.Attempts to install PIL with pip fail
#6.Things to keep in mind when installing PIL with pip
#For the time being, the current pip freeze
#Preferences for the time being on Mac OS X Lion
#Show Source
#index
#previous
#JAWSUG-Okinawa 2nd study NOTE
#Sphinx
Recommended Posts