您好,我是初学者,仅仅看到廖雪峰python教程的“函数”这一章。 感谢你的这个爬虫程序,我也想把他的教程爬下来,打印着看,可惜我安装的是python3的环境。请问您可以稍稍修改成适用python3的教程吗?谢谢!(我在python3里照着你的代码运行,然后根据报错信息在google解决方案,无奈错误太多,我看不懂了。。。)
Activity
xujh0709 commentedon Dec 1, 2015
现在,我卸载了python3,安装了python2,复制粘贴你的程序,运行后报错:
http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000
Traceback (most recent call last):
File "C:\Users\XuJH\pythondoc\2.py", line 42, in
html = html.split(r'')[1]
IndexError: list index out of range
请问如何解决?谢谢!
xujh0709 commentedon Dec 1, 2015
已解决,需要把[1]改为[0]
cyhhao commentedon Dec 5, 2015
@xujh0709 是要把html.split(r'')[1] 的[1]改为[0]吗?
cyhhao commentedon Dec 5, 2015
@xujh0709 少年你好刻苦。。。凌晨5点还在改bug。。。
xujh0709 commentedon Dec 5, 2015
时区不同。。。