Skip to content

Commit

Permalink
Merge pull request #710 from valkjsaaa/patch-3
Browse files Browse the repository at this point in the history
Avoid shadowing lan parameter in subtitle posting
  • Loading branch information
z0z0r4 authored Mar 11, 2024
2 parents 0272d9c + 8d02207 commit 41a6ae4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bilibili_api/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -1586,8 +1586,8 @@ async def submit_subtitle(
encoding="utf-8",
) as f:
subtitle_lans = json.load(f)
for lan in subtitle_lans:
if lan["lan"] == lan:
for lan_template in subtitle_lans:
if lan_template["lan"] == lan:
break
else:
raise ArgsException("lan 参数错误,请参见 https://s1.hdslb.com/bfs/subtitle/subtitle_lan.json")
Expand Down

0 comments on commit 41a6ae4

Please sign in to comment.