OSDN Git Service

pixivのプレビューが正しく動作しない場合があるバグを修正
authorsyo68k <syo68k@users.sourceforge.jp>
Fri, 23 Apr 2010 14:34:31 +0000 (14:34 +0000)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Feb 2012 14:11:34 +0000 (23:11 +0900)
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@179 e39ad16e-3079-482e-bb30-4b4d378143b6

Tween/Tween.vb

index fd9ecac..28dd3d7 100644 (file)
@@ -7953,11 +7953,11 @@ RETRY:
             '非ログインユーザー向けの画像ページ http://www.pixiv.net/index.php?mode=medium&illust_id=[ID番号]
             'サムネイルURL http://img[サーバー番号].pixiv.net/img/[ユーザー名]/[サムネイルID]_s.[拡張子]
             'サムネイルURLは画像ページから抽出する
-            mc = Regex.Match(url, "^http://www\.pixiv\.net/(member_illust|index)\.php\?mode=medium&illust_id=([0-9]+)$", RegexOptions.IgnoreCase)
+            mc = Regex.Match(url, "^http://www\.pixiv\.net/(member_illust|index)\.php\?mode=medium&(?:amp;)illust_id=(?<illustId>[0-9]+)$", RegexOptions.IgnoreCase)
             If mc.Success Then
                 Dim src As String = ""
-                If (New HttpVarious).GetData(mc.Groups(0).Value, Nothing, src) Then
-                    Dim _mc As Match = Regex.Match(src, mc.Result("http://img([0-9]+)\.pixiv\.net/img/.+/${2}_s\.([a-zA-Z]+)"))
+                If (New HttpVarious).GetData(Regex.Replace(mc.Groups(0).Value, "amp;", ""), Nothing, src) Then
+                    Dim _mc As Match = Regex.Match(src, mc.Result("http://img([0-9]+)\.pixiv\.net/img/.+/${illustId}_s\.([a-zA-Z]+)"))
                     If _mc.Success Then
                         imglist.Add(New KeyValuePair(Of String, String)(url, _mc.Value))
                     End If