Index: sitescripts/stats/bin/pagegenerator.py |
=================================================================== |
--- a/sitescripts/stats/bin/pagegenerator.py |
+++ b/sitescripts/stats/bin/pagegenerator.py |
@@ -10,17 +10,17 @@ |
# Adblock Plus is distributed in the hope that it will be useful, |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# GNU General Public License for more details. |
# |
# You should have received a copy of the GNU General Public License |
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
-import os, re, codecs, simplejson, time, itertools |
+import os, re, codecs, json, time, itertools |
from datetime import date |
from sitescripts.utils import get_config, setupStderr, get_custom_template_environment, cached |
import sitescripts.stats.common as common |
from sitescripts.stats.countrycodes import countrycodes |
@cached(float("inf")) |
def get_template_environment(): |
return get_custom_template_environment({ |
@@ -100,17 +100,17 @@ def generate_pages(datadir, outputdir): |
current_month = None |
for month, month_dir in get_names(server_type_dir, True): |
if current_month == None or month > current_month: |
current_month = month |
for filename, path in get_names(month_dir, False): |
filename = re.sub(r"\.json$", "", filename) |
with codecs.open(path, "rb", encoding="utf-8") as file: |
- data = simplejson.load(file) |
+ data = json.load(file) |
overview_url = "../../overview-" + common.filename_encode(filename + ".html") |
filtered_urls = {} |
for field in common.fields: |
if field["name"] not in data: |
continue |
# Create filtered views for the first thirty values of a field if they |
# have filtered data. |