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

@ -2,7 +2,6 @@ from __future__ import print_function
import json
import re
from six import text_type
from ox.cache import read_url
HEADERS = {
@ -17,9 +16,9 @@ USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) '
USER_AGENT += 'AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3'
def get_movie_data(title, director):
if isinstance(title, text_type):
if isinstance(title, str):
title = title.encode('utf-8')
if isinstance(director, text_type):
if isinstance(director, str):
director = director.encode('utf-8')
data = {}
# itunes section (preferred source for link)