mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 20:41:21 -05:00
SpiffyTitles: Improve Twitter/X match pattern
This commit is contained in:
parent
a2645152a4
commit
b1fd1467bd
@ -1754,7 +1754,7 @@ class SpiffyTitles(callbacks.Plugin):
|
|||||||
results = {}
|
results = {}
|
||||||
soup = BeautifulSoup(response["html"])
|
soup = BeautifulSoup(response["html"])
|
||||||
results["text"] = soup.get_text(" ").strip()
|
results["text"] = soup.get_text(" ").strip()
|
||||||
match = re.match(r"(.*)—(.*) \((.*)\) (.*)", results["text"])
|
match = re.match(r"(.*) — (.*) \((.*)\) (.*)", results["text"])
|
||||||
if match:
|
if match:
|
||||||
results["content"] = match.group(1)
|
results["content"] = match.group(1)
|
||||||
results["name"] = match.group(2)
|
results["name"] = match.group(2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user