Hi All,
I've got a python tool to read a simple amazon product page (I've arbitrarily chosen this printer lead HERE).
My Python tool seems to be working fine:
However, when I look at this in the results window, something strange has gone on.
Any ideas? Something to do with encoding? Workflow attached.
Many thanks,
James
Solved! Go to Solution.
Hi @JamesFo,
Thanks for posting.
The result is correct. In your code, you store "r.content" which is an array of bytes (source: https://requests.readthedocs.io/en/master/user/quickstart/#response-content). If you use "r.text" instead, you will obtain a readable text.
I have attached an amended version.
Hope that helps!
Paul Noirel
Sr Customer Support Engineer, Alteryx
Thank you for the solution - I'm a bit perplexed, as I'm sure I had that exact piece of code working before on other websites. Never the less, your solution definitely fixes it!
Out of interest, do you know why it shows properly in the python window, while sending the confused characters to Alteryx?
Thanks again for the help,
James