Unescape HTML, closes jarvis#159
This commit is contained in:
parent
efafe1ed5a
commit
7b9379b5c5
1 changed files with 3 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
import logging
|
import logging
|
||||||
from asyncio import sleep
|
from asyncio import sleep
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
|
from html import unescape
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
import tweepy.asynchronous
|
import tweepy.asynchronous
|
||||||
|
@ -50,6 +51,8 @@ def tweet_embeds(tweet: Status) -> List[Embed]:
|
||||||
if item["type"] in ["photo", "animated_gif"]:
|
if item["type"] in ["photo", "animated_gif"]:
|
||||||
photos.append(item["media_url_https"])
|
photos.append(item["media_url_https"])
|
||||||
|
|
||||||
|
text = unescape(text)
|
||||||
|
|
||||||
base_embed = build_embed(
|
base_embed = build_embed(
|
||||||
title="",
|
title="",
|
||||||
description=(text + f"\n\n[View this tweet]({url})"),
|
description=(text + f"\n\n[View this tweet]({url})"),
|
||||||
|
|
Loading…
Add table
Reference in a new issue