Skip to content

Commit

Permalink
twitter: only content text
Browse files Browse the repository at this point in the history
  • Loading branch information
supermomonga committed Jun 25, 2023
1 parent e29293b commit 1beb0a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MoEmbed.Core.Tests/Models/Metadata/TwitterMetadataTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class TwitterMetadataTest
[InlineData(
463440424141459456L,
"US Department of the Interior",
"Sunsets don't get much better than this one over @GrandTetonNPS. #nature #sunset pic.twitter.com/YuKy2rcjyU— US Department of the Interior (@Interior) May 5, 2014"
"Sunsets don't get much better than this one over @GrandTetonNPS. #nature #sunset pic.twitter.com/YuKy2rcjyU"
)]
public void FetchAsyncTest(long tweetId, string expectedDisplayName, string expectedDescription)
{
Expand Down
2 changes: 1 addition & 1 deletion MoEmbed.Core/Models/Metadata/TwitterMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected internal override EmbedData CreateEmbedData(Dictionary<string, object>

var parser = new AngleSharp.Html.Parser.HtmlParser();
using var doc = parser.ParseDocument(data.Html);
data.Description = doc.QuerySelector("blockquote").TextContent;
data.Description = doc.QuerySelector("blockquote p").TextContent;

return data;
}
Expand Down

0 comments on commit 1beb0a1

Please sign in to comment.