copy txweb/JsonResource import from scrapy