0

I use the requests Module with python At the moment. I use "r.status_code == 200" to check if the response is valid. But for my project right now it gaves me false posetives. It would be better for me to check if a response is valid with a Keyword check on the sourcecode or something like this is this possible ?

Viverde
  • 1
  • 1

1 Answers1

0

If I understand your question correctly, its possible for your request to give you back empty or invalid data that is not useful to you.

Without knowing what this request return you could look for specific fields in the request, for example if the request returns a json look for specific fields using if json_file.get("field_name", False)