mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-22 00:13:08 +00:00
Merge pull request #1503 from demelziraptor/amazon-json-response
[MRG+1] interpreting json-amazonui-streaming as TextResponse
This commit is contained in:
commit
129421c7e3
@ -25,6 +25,7 @@ class ResponseTypes(object):
|
||||
'application/xml': 'scrapy.http.XmlResponse',
|
||||
'application/json': 'scrapy.http.TextResponse',
|
||||
'application/x-json': 'scrapy.http.TextResponse',
|
||||
'application/json-amazonui-streaming': 'scrapy.http.TextResponse',
|
||||
'application/javascript': 'scrapy.http.TextResponse',
|
||||
'application/x-javascript': 'scrapy.http.TextResponse',
|
||||
'text/xml': 'scrapy.http.XmlResponse',
|
||||
|
@ -43,6 +43,7 @@ class ResponseTypesTest(unittest.TestCase):
|
||||
('application/xml; charset=UTF-8', XmlResponse),
|
||||
('application/octet-stream', Response),
|
||||
('application/x-json; encoding=UTF8;charset=UTF-8', TextResponse),
|
||||
('application/json-amazonui-streaming;charset=UTF-8', TextResponse),
|
||||
]
|
||||
for source, cls in mappings:
|
||||
retcls = responsetypes.from_content_type(source)
|
||||
|
Loading…
x
Reference in New Issue
Block a user