Pattern Matching in Python for Requests