Merge pull request #84 from crhowell/bugfix/ISSUE-83
Bugfix/Issue 83 UnicodeDecodeError for Windows
This commit is contained in:
		
						commit
						8d1244f430
					
				|  | @ -21,8 +21,11 @@ from youtube_transcript_api import ( | |||
| 
 | ||||
| 
 | ||||
| def load_asset(filename): | ||||
|     with open('{dirname}/assets/{filename}'.format(dirname=os.path.dirname(__file__), filename=filename)) as file: | ||||
|         return file.read() | ||||
|     filepath = '{dirname}/assets/{filename}'.format( | ||||
|         dirname=os.path.dirname(__file__), filename=filename) | ||||
|      | ||||
|     with open(filepath, mode="rb") as file: | ||||
|         return file.read().decode('utf-8') | ||||
| 
 | ||||
| 
 | ||||
| class TestYouTubeTranscriptApi(TestCase): | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue