mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-23 00:29:53 +05:30
Limit size of language request
This commit is contained in:
parent
1aef0d84cf
commit
909bb2be7f
@ -267,6 +267,7 @@ def rank_videos(db, n, pool, filter)
|
|||||||
else
|
else
|
||||||
description = XML.parse(video.description)
|
description = XML.parse(video.description)
|
||||||
content = [video.title, description.content].join(" ")
|
content = [video.title, description.content].join(" ")
|
||||||
|
content = content[0,1000]
|
||||||
|
|
||||||
results = DetectLanguage.detect(content)
|
results = DetectLanguage.detect(content)
|
||||||
language = results[0].language
|
language = results[0].language
|
||||||
|
Loading…
Reference in New Issue
Block a user