示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="appID">Appid of the game to get DLC of</param>
        /// <param name="statusCode">Can have different return value:
        /// - isok              means everything is cool man
        /// - tableDLCisnull    name speak by itself</param>
        /// <returns>A list of list of string containing DLC value and their names.</returns>
        private List <List <string> > GetDLCForSelectedAppIDAsync(int appID, ref string statusCode)
        {
            statusCode = "isok";
            string steamDBURLDlc           = "https://steamdb.info/app/" + appID.ToString() + "/dlc/";
            List <List <string> > tableDLC = WebGestion.GetTableFromPages(steamDBURLDlc, "//*[@id=\"dlc\"]/div/table"); //07.07.19 changed //*[@id="dlc"]/table to //*[@id="dlc"]/div/table

            if (tableDLC == null)
            {
                statusCode = "tableDLCisnull";
            }
            return(tableDLC);
        }
示例#2
0
 private async void gameSearch_ClickAsync(object sender, EventArgs e)
 {
     if (gameNameInput.Text == "" || gameNameInput.Text == "Write name to search here...")
     {
         MessageBox.Show("You must enter a game name before searching!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         string gameName     = gameNameInput.Text;
         string pattern      = @"\s";
         string substitution = @"+";
         Regex  regex        = new Regex(pattern);
         gameName = regex.Replace(gameName, substitution);
         string url = $"{urlRoot}/search/?a=app&q={gameName}&type=1&category=0";
         List <List <string> > table = WebGestion.GetTableFromPages(url);
         if (table == null)
         {
             MessageBox.Show("This game wasn't found... ", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
             Application.Exit();
         }
         this.Hide();
         (new GameSelecForm(table)).ShowDialog();
     }
 }
        public static void CreamApiVersionScraper(/*string[] userAuthentication*/)
        {
            var creamApiThreadURL = "https://cs.rin.ru/forum/viewtopic.php?p=1180852#p1180852";

            WebGestion.GetPage(creamApiThreadURL);
        }