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

25 Replies, 2107 Views

can beautifulsoup process json? Nope, it’s not designed for that.

But the `json` module is perfect. If you’re grabbing JSON from a URL, `requests` + `json` is the easiest:

```python
import requests
data = requests.get(url).json()
```

For querying, `jmespath` is super handy.

Messages In This Thread



Users browsing this thread: 1 Guest(s)