Skip to content

Commit

Permalink
Google Image search fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ClusterM committed Jan 13, 2017
1 parent 09226d2 commit 435b1d6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ImageGooglerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,16 @@ string[] GetImageUrls(string query)
reader.Close();
response.Close();
var urls = new List<string>();
string search = @"imgurl=(.*?)&";

string search = @"\""ou\""\:\""(?<url>.+?)\""";
MatchCollection matches = Regex.Matches(responseFromServer, search);
foreach (Match match in matches)
{
urls.Add(match.Groups[1].Value);
}

search = @"imgurl=(.*?)&";
matches = Regex.Matches(responseFromServer, search);
foreach (Match match in matches)
{
urls.Add(match.Groups[1].Value);
Expand Down

0 comments on commit 435b1d6

Please sign in to comment.