svnno****@sourc*****
svnno****@sourc*****
2011年 1月 20日 (木) 20:29:44 JST
Revision: 1389 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1389 Author: syo68k Date: 2011-01-20 20:29:44 +0900 (Thu, 20 Jan 2011) Log Message: ----------- Piaproプレビューの正規表現を再修正(thx @tk4168) Modified Paths: -------------- trunk/Tween/Thumbnail.vb -------------- next part -------------- Modified: trunk/Tween/Thumbnail.vb =================================================================== --- trunk/Tween/Thumbnail.vb 2011-01-20 11:25:03 UTC (rev 1388) +++ trunk/Tween/Thumbnail.vb 2011-01-20 11:29:44 UTC (rev 1389) @@ -1494,7 +1494,7 @@ Private Function Piapro_GetUrl(ByVal args As GetUrlArgs) As Boolean ' TODO URL判定処理を記述 - Dim mc As Match = Regex.Match(args.url, "^http://piapro\.jp/(?:content|t)/[0-9a-z]+", RegexOptions.IgnoreCase) + Dim mc As Match = Regex.Match(args.url, "^http://piapro\.jp/(?:content/[0-9a-z]+|t/[0-9a-zA-Z_\-]+)$") If mc.Success Then ' TODO 成功時はサムネイルURLを作成しimglist.Addする args.imglist.Add(New KeyValuePair(Of String, String)(args.url, mc.Value)) @@ -1519,7 +1519,7 @@ Private Function Piapro_CreateImage(ByVal args As CreateImageArgs) As Boolean ' TODO: サムネイル画像読み込み処理を記述します Dim http As New HttpVarious - Dim mc As Match = Regex.Match(args.url.Key, "^http://piapro\.jp/(?:content|t)/[0-9a-z]+", RegexOptions.IgnoreCase) + Dim mc As Match = Regex.Match(args.url.Key, "^http://piapro\.jp/(?:content/[0-9a-z]+|t/[0-9a-zA-Z_\-]+)$") If mc.Success Then Dim src As String = "" If http.GetData(args.url.Key, Nothing, src, 0, args.errmsg) Then