diff options
| author | 2019-11-26 13:41:40 +0000 | |
|---|---|---|
| committer | 2019-11-26 13:42:01 +0000 | |
| commit | 2d21dfa22931bdb887ccccba4a33e6fa4755e94b (patch) | |
| tree | 6ef5e304e3e9a69f9afd66ac0bee4d98ec115399 /modules/onionoo.py | |
| parent | remove all `eagle` stuff from nr.py (diff) | |
| signature | ||
utils.http.Response.data should always be `bytes` - add .decode and .soup
Diffstat (limited to 'modules/onionoo.py')
| -rw-r--r-- | modules/onionoo.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/onionoo.py b/modules/onionoo.py index 427cc487..bfd882cd 100644 --- a/modules/onionoo.py +++ b/modules/onionoo.py @@ -11,9 +11,9 @@ URL_RELAY_SEARCH_DETAILS = "https://metrics.torproject.org/rs.html#details/" def _get_relays_details(search): page = utils.http.request( - URL_ONIONOO_DETAILS, get_params={"search": search}, json=True) - if page and "relays" in page.data: - return page.data["relays"] + URL_ONIONOO_DETAILS, get_params={"search": search}).json() + if page and "relays" in page: + return page["relays"] raise utils.EventResultsError() def _format_relay_summary_message(relays, search): |
