drop six and python2 support

This commit is contained in:
j 2023-07-27 13:07:13 +02:00
commit adad3be419
31 changed files with 54 additions and 426 deletions

View file

@ -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