Skip to content Skip to sidebar Skip to footer

Python Scrapy: TypeError: To_bytes Must Receive A Unicode, Str Or Bytes Object, Got Int

I don't know what's wrong with this code. I am trying to scrape data from 99acres.com . i have passed the post parameters. This is the code from scrapy import Spider from scrapy.ht

Solution 1:

The reason behind this issue is, in Form Data, never ever treat Null, Boolean (True/False) and number as they are. Always treat it as a string. In python, Null is None, but in form data, it's always 'null'. True or False is written as 'true' or 'false'. For number, make it a string.


Post a Comment for "Python Scrapy: TypeError: To_bytes Must Receive A Unicode, Str Or Bytes Object, Got Int"