lzjun567 / python_scripts

一些python相关的演示代码
Apache License 2.0
717 stars 528 forks source link

list index out of range #33

Open yingxincui opened 6 years ago

yingxincui commented 6 years ago

python3 crawler.py Traceback (most recent call last): File "crawler.py", line 163, in crawler.run() File "crawler.py", line 90, in run for index, url in enumerate(self.parse_menu(self.request(self.start_url))): File "crawler.py", line 116, in parse_menu menu_tag = soup.findall(class="uk-nav uk-nav-side")[1] IndexError: list index out of range

EricDuy commented 6 years ago

我也遇到了同样的问题,请问你解决了吗?

zys864 commented 5 years ago

添加headers,修改user-agent