def parse1(self, response): global companyCombo,urlCounter,urlCompany sel = Selector(response) db = DbOperations() for companyAttr in companyCombo: if(companyAttr['url'] in response.url): company = companyAttr break jobs = sel.xpath('//div[contains(@type,"tuple")]').extract() if len(jobs) > 0: for job in jobs: jobAttr = self.getJobAttributes(job) if(jobAttr): db.insertJob(jobAttr,company['ro_id']) else: print jobAttr