MCPcopy Create free account
hub / github.com/Jack-Cherish/python-spider / ConvertToFile

Function ConvertToFile

bilibili/xml2ass.py:703–709  ·  view source on GitHub ↗
(filename_or_file, *args, **kwargs)

Source from the content-addressed store, hash-verified

701
702
703def ConvertToFile(filename_or_file, *args, **kwargs):
704 if isinstance(filename_or_file, bytes):
705 filename_or_file = str(bytes(filename_or_file).decode('utf-8', 'replace'))
706 if isinstance(filename_or_file, str):
707 return open(filename_or_file, *args, **kwargs)
708 else:
709 return filename_or_file
710
711
712def FilterBadChars(f):

Callers 2

Danmaku2ASSFunction · 0.70
ReadCommentsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected