diff --git a/PortablePorts/NReadability/NReadabilityTranscoder.cs b/PortablePorts/NReadability/NReadabilityTranscoder.cs index 0296921..e1e542d 100644 --- a/PortablePorts/NReadability/NReadabilityTranscoder.cs +++ b/PortablePorts/NReadability/NReadabilityTranscoder.cs @@ -111,7 +111,7 @@ namespace ReadSharp.Ports.NReadability private static readonly Regex _BreakBeforeParagraphRegex = new Regex("]*>\\s*(\\s| ?)*){1,}"); - private static readonly Regex _VideoRegex = new Regex("http:\\/\\/(www\\.)?(youtube|vimeo)\\.com", RegexOptions.IgnoreCase); + private static readonly Regex _VideoRegex = new Regex("\\/\\/(www\\.)?(youtube|vimeo)\\.com", RegexOptions.IgnoreCase); private static readonly Regex _ReplaceDoubleBrsRegex = new Regex("(]*>[ \\n\\r\\t]*){2,}", RegexOptions.IgnoreCase); private static readonly Regex _ReplaceFontsRegex = new Regex("<(\\/?)font[^>]*>", RegexOptions.IgnoreCase); private static readonly Regex _ArticleTitleDashRegex1 = new Regex(" [\\|\\-] "); @@ -1435,6 +1435,8 @@ namespace ReadSharp.Ports.NReadability var elementsToRemove = new List(); + // TODO: proof iframe videos + foreach (XElement element in elements) { /* Allow youtube and vimeo videos through as people usually want to see those. */ diff --git a/ReadSharp.Tests/ReadTests.cs b/ReadSharp.Tests/ReadTests.cs index 4b48883..be50803 100644 --- a/ReadSharp.Tests/ReadTests.cs +++ b/ReadSharp.Tests/ReadTests.cs @@ -124,17 +124,17 @@ namespace ReadSharp.Tests Assert.Equal(result.Title, expectedTitle); } - //[Fact] - //public async Task TestCriticalURIs() - //{ - // //Article result = await reader.Read(new Uri("http://www.jetbrains.com/resharper/whatsnew/index.html")); - // //Assert.NotEmpty(result.Content); + [Fact] + public async Task TestCriticalURIs() + { + Article result = await reader.Read(new Uri("http://wpcentral.com.feedsportal.com/c/33999/f/616880/s/35a02b5e/sc/15/l/0L0Swpcentral0N0Cgameloft0Ediscusses0Etheir0Enew0Egame0Ebrothers0Earms0E30Esons0Ewar0Eceslive/story01.htm")); + Assert.NotEmpty(result.Content); - // //result = await reader.Read(new Uri("http://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx")); - // //Assert.NotEmpty(result.Content); + //result = await reader.Read(new Uri("http://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx")); + //Assert.NotEmpty(result.Content); - // //Article result = await reader.Read(new Uri("http://bit.ly/KAh7FJ")); - // //Assert.NotEmpty(result.Content); - //} + //Article result = await reader.Read(new Uri("http://bit.ly/KAh7FJ")); + //Assert.NotEmpty(result.Content); + } } } \ No newline at end of file