-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
garbled text occur when input Chinese text #779
Comments
@kejicjk I don't know if you've solved your problem but I'd just like to point out that this has nothing to do with this library, this is how the To "solve" it, just ensure that you add import sys
import json
from guessit import guessit
def parse_video_info(file_path):
guess = guessit(file_path)
result = {
"title": guess.get("title"),
"season": guess.get("season"),
"episode": guess.get("episode"),
}
print(json.dumps(result, ensure_ascii=False))
### Output: {"title": "庆余年第二季", "season": null, "episode": 1}
if __name__ == "__main__":
file_path = sys.argv[1]
parse_video_info(file_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
garbled text occur when input Chinese text, for example
input:
python3 videoTextGuessit.py 庆余年第二季/01.mp4
response is
{"title": "\u5e86\u4f59\u5e74\u7b2c\u4e8c\u5b63", "season": null, "episode": 1}
script detail is
The text was updated successfully, but these errors were encountered: