Connected to pydev debugger (build 171.3780.115) Traceback (most recent call last): File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1578, in <module> globals = debugger.run(setup['file'], None, None, is_module) File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1015, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/Users/Documents/project/crawler/ArticalSpider/tools/crwal_xici_ip.py", line 39, in <module> crawl_ips() File "/Users/Documents/project/crawler/ArticalSpider/tools/crwal_xici_ip.py", line 34, in crawl_ips (ip_info[0], ip_info[1], ip_info[3], ip_info[2]) File "/Users/.virtualenvs/article_spider/lib/python3.6/site-packages/pymysql/cursors.py", line 164, in execute query = self.mogrify(query, args) File "/Users/.virtualenvs/article_spider/lib/python3.6/site-packages/pymysql/cursors.py", line 143, in mogrify query = query % self._escape_args(args, conn) TypeError: not all arguments converted during string formatting
老师 我跟着你爬西刺的时候遇到这个错误,改了好多次都不行,代码如下
带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎
了解课程