diff --git a/myScrapy/Cache.py b/myScrapy/Cache.py index c952a98..efc6002 100644 --- a/myScrapy/Cache.py +++ b/myScrapy/Cache.py @@ -18,9 +18,11 @@ def cache(self, response): class Trans(object): - __slots__ = ('url', 'method', 'cache') + __slots__ = ('url', 'method', 'cache','formdata') def __init__(self, **kwargs): self.url = kwargs.pop('url') self.method = kwargs.pop('method') - self.cache = kwargs.pop('cache_obj') \ No newline at end of file + self.cache = kwargs.pop('cache_obj') + temp_dict = kwargs.pop('formdata') if kwargs.pop('formdata') else None + self.formdata = [(k, v) for k, v in temp_dict.iteritems()] \ No newline at end of file