Changeset 1936:a32f3fe4fe6d for scrapy/http/response/text.py
- Timestamp:
- 02/24/10 14:01:29 (7 months ago)
- Branch:
- default
- Files:
-
- 1 modified
-
scrapy/http/response/text.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scrapy/http/response/text.py
r1809 r1936 6 6 """ 7 7 8 import codecs 8 9 import re 9 10 … … 65 66 encoding = self._ENCODING_RE.search(content_type) 66 67 if encoding: 67 return encoding.group(1) 68 enc = encoding.group(1) 69 try: 70 codecs.lookup(enc) # check if the encoding is valid 71 return enc 72 except LookupError: 73 pass 68 74 69 75 @memoizemethod_noargs
