SpiffyTitles: Improve Twitter/X match pattern

This commit is contained in:
Gordon Shumway 2023-10-17 03:22:00 -04:00 committed by GitHub
parent a2645152a4
commit b1fd1467bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1754,7 +1754,7 @@ class SpiffyTitles(callbacks.Plugin):
results = {}
soup = BeautifulSoup(response["html"])
results["text"] = soup.get_text(" ").strip()
match = re.match(r"(.*)—(.*) \((.*)\) (.*)", results["text"])
match = re.match(r"(.*) (.*) \((.*)\) (.*)", results["text"])
if match:
results["content"] = match.group(1)
results["name"] = match.group(2)