mirror of https://gitlab.com/bashrc2/epicyon
Remove links during translation
parent
2f50edf489
commit
35219af5ea
|
@ -220,6 +220,10 @@ def _libretranslate(url: str, text: str,
|
||||||
# LibreTranslate doesn't like markup
|
# LibreTranslate doesn't like markup
|
||||||
text = removeHtml(text)
|
text = removeHtml(text)
|
||||||
|
|
||||||
|
# remove any links from plain text version of the content
|
||||||
|
for _, url in links.items():
|
||||||
|
text = text.replace(url, '')
|
||||||
|
|
||||||
ltParams = {
|
ltParams = {
|
||||||
"q": text,
|
"q": text,
|
||||||
"source": source,
|
"source": source,
|
||||||
|
|
Loading…
Reference in New Issue