Skip to content

Instantly share code, notes, and snippets.

@showyou
Created March 3, 2010 07:37
Show Gist options
  • Save showyou/320411 to your computer and use it in GitHub Desktop.
Save showyou/320411 to your computer and use it in GitHub Desktop.
#!/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