mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-01 15:47:06 +00:00
chore: remove all six compat code
This commit is contained in:
@@ -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})?')
|
||||
|
||||
Reference in New Issue
Block a user