Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCluster <clusterrr@clusterrr.com>2020-08-09 21:59:17 +0300
committerCluster <clusterrr@clusterrr.com>2020-08-09 21:59:17 +0300
commitbf1db47ba16308e6f774ae145bc964fa89072339 (patch)
treee2f91bc26c6167ed5994b79fa25ee481dcc363cf /ImageGooglerForm.cs
parentb2af0c0a47b55aeb61ca068d84e91b0949c687d4 (diff)
Google Images fix
Diffstat (limited to 'ImageGooglerForm.cs')
-rw-r--r--ImageGooglerForm.cs17
1 files changed, 2 insertions, 15 deletions
diff --git a/ImageGooglerForm.cs b/ImageGooglerForm.cs
index 4bd352ba..a3385ef8 100644
--- a/ImageGooglerForm.cs
+++ b/ImageGooglerForm.cs
@@ -49,23 +49,10 @@ namespace com.clusterrr.hakchi_gui
//Debug.WriteLine("Web response: " + responseFromServer);
var urls = new List<string>();
- string search = @"\""ou\""\:\""(?<url>.+?)\""";
+ string search = @"\[""(?<url>https?:\/\/.*?\.(jpg|jpeg|png))\"",\d+,\d+\]";
MatchCollection matches = Regex.Matches(responseFromServer, search);
foreach (Match match in matches)
- {
- urls.Add(HttpUtility.UrlDecode(match.Groups[1].Value.Replace("\\u00", "%")));
- }
-
- // For some reason Google returns different data for dirrefent users (IPs?)
- // There is alternative method
- search = @"imgurl=(.*?)&";
- matches = Regex.Matches(responseFromServer, search);
- foreach (Match match in matches)
- {
- // Not sure about it.
- urls.Add(HttpUtility.UrlDecode(match.Groups[1].Value.Replace("\\u00", "%")));
- }
-
+ urls.Add(match.Groups["url"].Value);
return urls.ToArray();
}