Why is the slash at the end of lxml.html.parse() important?
问题 I am using lxml to scrape html. This code works. lxml.html.parse( "http://google.com/" ) This code does not. lxml.html.parse( "http://google.com" ) Why does the slash at the end of the URL matter? Thank you. To be clear, here is the error log that python is giving me from the latter code. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/davidfaux/epd-7.2-2-rh5-x86/lib/python2.7/site-packages/lxml/html/__init__.py", line 692, in parse return etree.parse