瀏覽代碼

Revert "ast.literal_eval -> json.loads"

This reverts commit 6d940b5c92.
copyvios-ng
Ben Kurtovic 8 年之前
父節點
當前提交
e6e83ed73c
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      copyvios/turnitin.py

+ 3
- 3
copyvios/turnitin.py 查看文件

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import json
from ast import literal_eval
import re

import requests
@@ -31,8 +31,8 @@ def _make_api_request(page_title, lang):
'report': 1}

result = requests.get(TURNITIN_API_ENDPOINT, params=api_parameters)
# use json.loads to *safely* parse the resulting dict-containing string
parsed_api_result = json.loads(result.text)
# use literal_eval to *safely* parse the resulting dict-containing string
parsed_api_result = literal_eval(result.text)
return parsed_api_result

class TurnitinResult(object):


Loading…
取消
儲存