drop six and python2 support
This commit is contained in:
parent
955b4a4e9b
commit
adad3be419
31 changed files with 54 additions and 426 deletions
|
|
@ -4,8 +4,7 @@ from __future__ import print_function
|
|||
|
||||
import re
|
||||
|
||||
from six.moves import urllib
|
||||
from six import string_types
|
||||
import urllib
|
||||
|
||||
from ox.utils import json
|
||||
from ox.cache import read_url
|
||||
|
|
@ -69,7 +68,7 @@ def get_movie_data(wikipedia_url):
|
|||
value = value.split('<br>')
|
||||
if value:
|
||||
if key in filmbox:
|
||||
if isinstance(value, list) and isinstance(filmbox[key], string_types):
|
||||
if isinstance(value, list) and isinstance(filmbox[key], str):
|
||||
filmbox[key] = [filmbox[key]] + value
|
||||
else:
|
||||
filmbox[key] += value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue