Issue
I have a simply code for scrapy but i got an error when there is None, see my code below, how can fix it
In [428]: ''.join(response.css(".prdd-price-first::text").get()).strip()
TypeError: can only join an iterable
Solution
Iterable means your expression to be a list. So you can do something like:
''.join([ x.get().strip() for x in response.css(".prdd-price-first::text")])
Answered By - Fazlul
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.