Issue
I would like to add some characters to the text output.
Here is my code:
thumbnailname = detail.xpath('.//h1/text()').get().replace(' ','-')
Here is my text output:
Apple-iPhone-13-Pro-Max
How do I get the following output?
My-Apple-iPhone-13-Pro-Max.jpg
Solution
Just concatenate the strings:
thumbnailname = "My-" + detail.xpath('.//h1/text()').get().replace(' ','-') + ".jpg"
Answered By - SuperUser
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.