Can BeautifulSoup Process JSON? Or Do I Need Another Tool? Alternatively: Can BeautifulSoup Process J

20 Replies, 951 Views

BS + JSON = 🤡

Just use `json.loads()` or `requests.get().json()`. If you need to query JSON, `jmespath` is 🔥.

Example:
```python
import jmespath
result = jmespath.search("users[*].name", data)
```
Way cleaner than trying to force BS into it.

Messages In This Thread



Users browsing this thread: 1 Guest(s)