Skip to content

Commit

Permalink
added
Browse files Browse the repository at this point in the history
  • Loading branch information
CitrusSin committed Jan 28, 2019
1 parent cbf54b8 commit 1e52093
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions MFML/Download/OptifineDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,15 @@ public override List<string> GetAllItemsToDownload()
var downloads = wc.DownloadString(OPTIFINE_OFFICAL_DOWNLOADS);
Match main = Regex.Match(
downloads,
string.Format("<h2>Minecraft {0}</h2>\\s*\r?\n?\\s*(.*?)\\s*\r?\n?\\s*</table>", id),
RegexOptions.Multiline
string.Format("<h2>Minecraft {0}</h2>((.|\n)*?)</table>", id.Replace(".", "\\."))
);
MatchCollection matches = Regex.Matches(
main.Value,
"<tr class='downloadLine.*?'>\n?" +
"<td class='downloadLineFile.*?'>(.*?)</td>\n?" +
"<td class='downloadLineDownload.*?'><a href =\".*?\">Download</a></td>\n?" +
"<td class='downloadLineMirror'><a href =\"(.*?)\">.*?</a></td>\n?" +
"<td class='downloadLineChangelog'><a href='.*?'>changelog</a></td>\n?" +
"<tr class='downloadLine.*?'>\n" +
"<td class='downloadLineFile.*?'>(.*?)</td>\n" +
"<td class='downloadLineDownload.*?'><a href =.*?>.*?</a></td>\n" +
"<td class='downloadLineMirror'><a href =\"(.*?)\">.*?</a></td>\n" +
"<td class='downloadLineChangelog'><a href=.*?>.*?</a></td>\n" +
"<td class='downloadLineDate'>(.*?)</td>"
);
foreach (Match match in matches)
Expand Down

0 comments on commit 1e52093

Please sign in to comment.