diff options
author | Vitiko <[email protected]> | 2022-05-03 14:47:16 -0400 |
---|---|---|
committer | Vitiko <[email protected]> | 2022-05-03 14:47:16 -0400 |
commit | 7423c80a28b894812b121a89f38d045f7c87d5ca (patch) | |
tree | 947f1f442bf262e0ae790bc608370951d95085f0 /libs | |
parent | 79f81e0edbcb994db1816d874a448b992b81a00f (diff) | |
download | bazarr-7423c80a28b894812b121a89f38d045f7c87d5ca.tar.gz bazarr-7423c80a28b894812b121a89f38d045f7c87d5ca.zip |
Subdivx Provider: improve language parser
Diffstat (limited to 'libs')
-rw-r--r-- | libs/subliminal_patch/providers/subdivx.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/subliminal_patch/providers/subdivx.py b/libs/subliminal_patch/providers/subdivx.py index 68b4a33dc..bc902363e 100644 --- a/libs/subliminal_patch/providers/subdivx.py +++ b/libs/subliminal_patch/providers/subdivx.py @@ -216,13 +216,14 @@ class SubdivxSubtitlesProvider(Provider): if not any(item in datos for item in ("Cds:</b> 1", "SubRip")): continue - spain = "/pais/7.gif" in datos - language = Language.fromalpha2("es") if spain else Language("spa", "MX") - # description sub_details = body_soup.find("div", {"id": "buscador_detalle_sub"}).text description = sub_details.replace(",", " ") + # language + spain = "/pais/7.gif" in datos or "espaƱa" in description.lower() + language = Language.fromalpha2("es") if spain else Language("spa", "MX") + # uploader uploader = body_soup.find("a", {"class": "link1"}).text download_url = _get_download_url(body_soup) |