Skip to content

Commit 9c4d7ca

Browse files
committed
removed scrapely.json kept for python 2.5 compatibility (no longer needed)
1 parent 7b6951f commit 9c4d7ca

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

scrapely/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import urllib
2-
try:
3-
import json
4-
except ImportError:
5-
import simplejson as json
2+
import json
63

74
from scrapely.htmlpage import HtmlPage, page_to_dict, url_to_page
85
from scrapely.template import TemplateMaker, best_match

scrapely/extraction/pageparsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
44
Parsing of web pages for extraction task.
55
"""
6+
import json
67
from collections import defaultdict
78
from numpy import array
89

9-
from scrapely import json
1010
from scrapely.htmlpage import HtmlTagType, HtmlTag, HtmlPage
1111
from scrapely.extraction.pageobjects import (AnnotationTag,
1212
TemplatePage, ExtractionPage, AnnotationText, TokenDict, FragmentedHtmlPageRegion)

scrapely/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import copy
2+
import json
23

3-
from scrapely import json
44
from scrapely.htmlpage import HtmlTag, HtmlTagType
55

66
class AnnotationError(Exception):

scrapely/tests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
2+
import json
23
from os import path
34
from itertools import count
4-
from scrapely import json
55

66
_PATH = path.abspath(path.dirname(__file__))
77

0 commit comments

Comments
 (0)