Merge branch 'master' into feature/ISSUE-23

This commit is contained in:
Chris Howell 2020-10-10 21:13:51 -07:00
commit 138643a682
1 changed files with 5 additions and 2 deletions

View File

@ -21,8 +21,11 @@ from youtube_transcript_api import (
def load_asset(filename): def load_asset(filename):
with open('{dirname}/assets/{filename}'.format(dirname=os.path.dirname(__file__), filename=filename)) as file: filepath = '{dirname}/assets/{filename}'.format(
return file.read() dirname=os.path.dirname(__file__), filename=filename)
with open(filepath, mode="rb") as file:
return file.read().decode('utf-8')
class TestYouTubeTranscriptApi(TestCase): class TestYouTubeTranscriptApi(TestCase):