2024-10-06 12:32:33 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
2024-10-06 14:05:10 +03:00
|
|
|
|
using GtaVUsersInfo.Helpers;
|
2024-10-06 12:32:33 +03:00
|
|
|
|
|
|
|
|
|
namespace GtaVUsersInfo
|
|
|
|
|
{
|
|
|
|
|
public partial class MainForm : Form
|
|
|
|
|
{
|
|
|
|
|
public MainForm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void MainForm_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
2024-10-06 14:05:10 +03:00
|
|
|
|
|
|
|
|
|
}
|
2024-10-06 12:32:33 +03:00
|
|
|
|
|
2024-10-06 14:05:10 +03:00
|
|
|
|
async private void parserButton_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
using (var parser = new CarParser())
|
|
|
|
|
{
|
|
|
|
|
var cars = await parser.ParseCarsFromPages(25);
|
|
|
|
|
parser.SaveToJson(cars, "cars.json");
|
|
|
|
|
Console.WriteLine("Data saved to cars.json");
|
|
|
|
|
}
|
2024-10-06 12:32:33 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|