@@ -75,10 +75,11 @@ private async Task<NewsStorage> ParseLink(NewsStorage newsStorage)
7575
7676 if ( ! String . IsNullOrEmpty ( pageBody ) )
7777 {
78- Match titleMatch = Regex . Match ( pageBody , "page-title\" >(.*)<" , RegexOptions . RightToLeft ) ;
79- Match calendarMatch = Regex . Match ( pageBody , "fa fa-calendar\" ><\\ /i> (.*)" , RegexOptions . RightToLeft ) ;
80- Match userMatch = Regex . Match ( pageBody , "fa fa-user\" ><\\ /i>(.*) " , RegexOptions . RightToLeft ) ;
81- Match categoryMatch = Regex . Match ( pageBody , "category tag\" >(.*)<" , RegexOptions . RightToLeft ) ;
78+ Match titleMatch = Regex . Match ( pageBody , "\" headline\" : \" (.*)\" " ) ;
79+ Match calendarMatch = Regex . Match ( pageBody . Replace ( "\r " , "" ) . Replace ( " " , "" ) . Replace ( "\n " , "" ) , "<p class=\" is-5 is-uppercase\" >(.*?)<" ) ;
80+ Match userMatch = Regex . Match ( pageBody , "\" author\" : \" (.*)\" " ) ;
81+ Match categoryMatch = Regex . Match ( pageBody , "\" category tag\" >(.*)<\\ /a><\\ /p>" ) ;
82+ Clipboard . SetText ( pageBody . Replace ( "\r " , "" ) . Replace ( " " , "" ) . Replace ( "\n " , "" ) ) ;
8283
8384 if ( titleMatch . Success && titleMatch . Groups [ 1 ] . Success )
8485 {
@@ -142,6 +143,15 @@ private async Task<NewsStorage> ParseLink(NewsStorage newsStorage)
142143 {
143144 newsStorage . ThumbnailUrl_Alt = thumbnailMatchAlt . Groups [ 1 ] . Value ;
144145 }
146+ else
147+ {
148+ thumbnailMatchAlt = Regex . Match ( pageBody , "\" image\" : \" (.*)\" " ) ;
149+
150+ if ( thumbnailMatchAlt . Success && thumbnailMatchAlt . Groups [ 1 ] . Success )
151+ {
152+ newsStorage . ThumbnailUrl_Alt = thumbnailMatchAlt . Groups [ 1 ] . Value ;
153+ }
154+ }
145155 }
146156
147157 newsStorage . Parsed = true ;
0 commit comments