On 10/23/2011 9:59 AM, 水静流深 wrote:
i change my code into :
Calling your file xml.py (as indicated below) is a potentially bad idea
since the Python stdlib has a package named 'xml'. If you write 'import
xml.xxx' in another file in the same directory, Python will try to find
'xxx' in your xml
i change my code into :
import urllib.request, urllib.parse, urllib.error
import lxml.html
down='http://frux.wikispaces.com/'
root=urllib.request.urlopen(down).read()
root=lxml.html.fromstring(root)
file=root.xpath('//a')
for i in file:
str1=i.text_content()
if str1.find('pdf') >-1 :