Created
March 3, 2010 07:37
-
-
Save showyou/320411 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import urllib | |
from BeautifulSoup import BeautifulSoup | |
f = urllib.urlopen("http://php.net/manual/ja/indexes.php") | |
soup = BeautifulSoup(f.read()) | |
for func in soup.findAll("dd"): | |
if func.find('a'): | |
print "\"",func.a.contents[0],"\"," | |
elif func.find('b'): | |
print "\"",func.b.contents[0],"\"," | |
else: | |
print "\"",func.contents[0],"\"," |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment