Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. def start_requests(self):
  2. nubmers="12345"
  3. submitForm = FormRequest("https://domain.com/url",
  4. formdata={'address':numbers,'submit':'Search'},
  5. callback=self.after_submit)
  6. return [submitForm]
  7.  
  8. 12345
  9. 54644
  10. 32145
  11. 12345
  12.  
  13. def start_requests(self):
  14. with open('C:spidersuspszips.csv') as fp:
  15. for line in fp:
  16. submitForm = FormRequest("https://domain.com/url",
  17. formdata={'address':line,
  18. 'submit':'Search'},callback=self.after_submit,dont_filter=True)
  19. return [submitForm]
  20.  
  21. if not request.dont_filter and self.df.request_seen(request):
  22. exceptions.AttributeError: 'list' object has no attribute 'dont_filter'
  23.  
  24. def start_requests(self):
  25. with open('C:spidersuspszips.csv') as fp:
  26. for line in fp:
  27. yield FormRequest("https://domain.com/url",
  28. formdata={'address':line, 'submit':'Search'},
  29. callback=self.after_submit,
  30. dont_filter=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement