def url_is_from_spider(url, spider):
 return url_is_from_any_domain(url, ([spider.name] + getattr(spider, 'allowed_domains', [])))

def url_is_from_spider ( url , spider ) : return url_is_from_any_domain ( url , ( [ spider . name ] + getattr ( spider , 'allowed_domains' , [ ] ) ) )
return true if the url belongs to the given spider .