Cześć Maciek :)

In general, you can pass extra arguments when you call addCallback(s) or
addErrback. They will get passed to the callback.

However, as a side note to that code example, do you understand the
difference between

.addCallbacks(cb, eb)

and:

.addCallback(cb).addErrback(eb)


and:

.addErrback(eb).addCallback(cb)

... Also, keep in mind that you only errback when there is an issue setting
up the connection. If the server successfully responds with an error (say,
a 404 Not Found, or something), the callback will be called with the
response object. So, your question doesn't make a lot of sense to me: if
the errback gets called, there's not really a response!

Also, if you want to do scraping with Twisted, consider looking at Scrapy,
a fully-featured web scraper that uses Twisted internally.

pozdrawiam
lvh
​
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to