Verified Commit 1ed29404 authored by Torsten Grote's avatar Torsten Grote
Browse files

Initial commit

parents
#!/usr/bin/env python3
import csv
import urllib.request
import codecs
url = 'http://labs.ooni.io/data/vanilla-tor/20171130-vanilla_tor-stats.csv'
stream = urllib.request.urlopen(url)
data = csv.DictReader(codecs.iterdecode(stream, 'utf-8'))
blocked_countries = []
for row in data:
if int(row['total_count']) < 5:
continue
if float(row['success_perc']) > 0.5:
continue
blocked_countries.append(row['probe_cc'])
print(blocked_countries)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment