Skip to content

Commit

Permalink
Google Images fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ClusterM committed Aug 9, 2020
1 parent b2af0c0 commit bf1db47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
17 changes: 2 additions & 15 deletions ImageGooglerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,10 @@ public static string[] GetImageUrls(NesMiniApplication app)
//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();
}

Expand Down
5 changes: 3 additions & 2 deletions hakchi_gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@
<SignManifests>true</SignManifests>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>1D05715BF83320949FC1BAC8462308051A0C0F04</ManifestCertificateThumbprint>
<ManifestCertificateThumbprint>525D016AC453C9B9D64743D1D1A4462DD3DCEB61</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>cluster_cert.pfx</ManifestKeyFile>
<ManifestKeyFile>
</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
Expand Down

0 comments on commit bf1db47

Please sign in to comment.