Fix deprecated code.

Running project on the current version of Scrapy emits several deprecation warnings. This PR fixes that.