0

I am using requests for the website jp.123rf.com. However, I noticed that when URL contains Percent-encodings that are upper cases, e.g., %E9%A3%9B%E8%BA%8D, it will return 302 and ask you to use the lower cases. Then requests will converts the lower cases to upper cases before accessing the new url, resulting in an infinite loop.

I tried to explicitly convert the Percent-encodings by requests.get('https://jp.123rf.com/stock-photo/{}.html'.format(quote(query).lower()) but requests still automatically converts them to upper cases.

Alex Fu
  • 113
  • 1
  • 8
  • 1
    Does this answer your question? [How do I encode/decode percent-encoded (URL) strings in Python?](https://stackoverflow.com/questions/33143504/how-do-i-encode-decode-percent-encoded-url-strings-in-python) – mkrieger1 Apr 09 '23 at 21:02

0 Answers0