chore: remove all six compat code

This commit is contained in:
Ankush Menat
2021-11-04 19:48:32 +05:30
parent 56a25a0c4f
commit 8fe5feb6a4
420 changed files with 179 additions and 678 deletions

View File

@@ -10,7 +10,6 @@ import pytz
from frappe import _
from frappe.model.document import Document
from pyyoutube import Api
from six import string_types
class Video(Document):
@@ -87,7 +86,7 @@ def get_id_from_url(url):
Returns video id from url
:param youtube url: String URL
"""
if not isinstance(url, string_types):
if not isinstance(url, str):
frappe.throw(_("URL can only be a string"), title=_("Invalid URL"))
pattern = re.compile(r'[a-z\:\//\.]+(youtube|youtu)\.(com|be)/(watch\?v=|embed/|.+\?v=)?([^"&?\s]{11})?')