Here are the examples of the python api scrapy.exporters.PythonItemExporter taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
0
Example 1
View licensedef _get_exporter(self, **kwargs): return PythonItemExporter(binary=False, **kwargs)
0
Example 2
View licensedef test_invalid_option(self): with self.assertRaisesRegexp(TypeError, "Unexpected options: invalid_option"): PythonItemExporter(invalid_option='something')
0
Example 3
View licensedef test_export_binary(self): exporter = PythonItemExporter(binary=True) value = TestItem(name=u'John\xa3', age=u'22') expected = {b'name': b'John\xc2\xa3', b'age': b'22'} self.assertEqual(expected, exporter.export_item(value))