Skip to content

Commit

Permalink
post method
Browse files Browse the repository at this point in the history
yqh231 committed Jan 20, 2017
1 parent 5875d23 commit c2cab8a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions myScrapy/Cache.py
Original file line number Diff line number Diff line change
@@ -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')
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()]

0 comments on commit c2cab8a

Please sign in to comment.