0

I'm trying to send a query that is URL-encoded as follows. However, an error occurs because % and & in the query are recognized as conversion specifiers. How do I solve it?

import requests

requests.get("8.8.8.8/abc.php?strrh=%3d%81%26%ad%f94%5c%f0%3c%cej%c00%a4%e5x%07%06%92%da&id=%f9&num=1124")
Sliced_ice
  • 37
  • 4

1 Answers1

0

You should use urllib.parse.urlencode() to properly form the query string in the URL.

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268