Traceback (most recent call last):
File "discover.py", line 91, in <module>
main()
File "discover.py", line 82, in main
test(browser, logfile, max_try_times)
File "discover.py", line 50, in test
discover_one(site, browser, logfile, max_try_times)
File "discover.py", line 43, in discover_one
ps.work()
File "/Users/wyw/Codes/FbScraping/page_spider.py", line 18, in work
pc.crawl()
File "/Users/wyw/Codes/FbScraping/page_crawler.py", line 17, in crawl
self.expand_post()
File "/Users/wyw/Codes/FbScraping/page_crawler.py", line 55, in expand_post
self.write_to_db_func(p_url)
File "/Users/wyw/Codes/FbScraping/page_pipeline.py", line 32, in write_post
p['url_hash'] = zlib.crc32(url.encode())
AttributeError: 'NoneType' object has no attribute 'encode'
I think the source of errors is here