Issue
I would like to get "2" from below string by scrapy but however I could not get "2"
In [502]: response.css("a.font-size-4.p-15.collapsed::text")[1].getall()
Out[502]: ['\n\t\t\t\t\t\t\tYorumlar (2)\n\t\t\t\t\t\t']
Solution
Try:
''.join([ x.strip().replace('Yorumlar','').replace('(','').replace(')','') for x in response.css("a.font-size-4.p-15.collapsed::text")[1].getall()])
Answered By - Fazlul
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.