python 2.7 - Scrapy Request callback method never called -


I am creating a crawlpidder using Scrapy 0.22.2 for Python 2.7.3 and I request that The callback method that I have never referred is called. Here is a snippet from my parsing method that initiates a request within an alief block:

  elif current_status == "Superseded": # There is a lot of work to do here. It is to check whether the replacement unit is available or not. If not, download whatever is the outline # where we have a & lt; Td> The element in which "has been installed by" and update the link, which is updated_unit = hxs.xpath ('/ html / body / div [@ id = "page"] / div [@ id = "layoutWrapper"] / div [@ id = "twoColLayoutWrapper"] / div [@ id = "twoColLayoutLeft"] / div [@ class = "layoutContentWrapper"] / div [@ class = "external"] / div [@ class = "fieldset"] / div [@ Class = "display-row"] / div [@ class = "display-row"] / div [@ class = "display-field-info"] / div [@ class = "T-widget T-grid" ] / Table / tab / tr [1] / td [contains (".," Is overwritten by ")] / a '# update an update_link element of child = Update_enit.exp ('@ href'). Extract () [0] updated_url = "http: //training.gov.au" + updated_unit_link print "\ 033 [0; 31mSuperceded" + updated_url + "\ 033 [0m" #Red has been dispersed in print, the current yield request (url = updated_url, callback = 'sort upset', dont_filter = true) def sortSuperseded (auto, response): "I execute it and the URL is OK but sorted Has never been called because I have never printed in the 'console callback name' printed in the console  

which URL I I am also looking for the domain that I specify for my crawlspider.

  allowed_amman = ["training.gov.au"]   

Where am I going wrong?

Quotation is not required around the callback method name. Change line:

  from the yield request (url = updated_url, callback = 'sortedupeded', dont_filter = true)   

to

 < Code> yield request (updated_url, callback = self.sortSuperseded, dont_filter = True)    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -