static void Main(string[] args)
{
//var addresses = GetAddresses("c:\\Sergey\\Misc\\addresses2.xml");
var addresses = new List<string>()
{
"https://www.decathlon.ru/C-207513-rukzaki",
"https://www.decathlon.ru/C-207514-nozh",
"https://www.decathlon.ru/C-207515-binokl",
"https://www.decathlon.ru/C-207516-oruzhejnye-chehly-i-kejsy",
"https://www.decathlon.ru/C-20751-nabory-dlja-chistki-oruzhija",
"https://www.decathlon.ru/C-207518-skladnye-stulja",
"https://www.decathlon.ru/C-207519-aksessuary-dla-sobak",
"https://www.decathlon.ru/C-207520-zashhita-ot-dozhdja",
"https://www.decathlon.ru/C-218667-shtani",
"https://www.decathlon.ru/C-218668-futbolki",
"https://www.decathlon.ru/C-218670-fluo",
"https://www.decathlon.ru/C-205088-zhenskaja-odezhda-dlja-iogi",
"https://www.decathlon.ru/C-205089-muzhskaja-odezhda-dlja-iogi",
"https://www.decathlon.ru/C-205090-oborudovanie-dlja-iogi",
"https://www.decathlon.ru/C-180032-odezhda-dlja-gimnastiki",
"https://www.decathlon.ru/C-180033-obuv'-dlja-gimnastiki",
"https://www.decathlon.ru/C-180034-aksessuary-dlja-gimnastiki",
"https://www.decathlon.ru/C-180029-odejda-dlya-baleta",
"https://www.decathlon.ru/C-180030-obuv'-dlya-baleta",
"https://www.decathlon.ru/C-180031-aksessuary",
"https://www.decathlon.ru/C-180026-odejda",
"https://www.decathlon.ru/C-180027-obuv'"
};
var products = new List<Product>();
string filenameProductsData = "c:\\Sergey\\Misc\\products1.csv";
int inxAddress = 0;
foreach (var address in addresses)
{
bool isAppend = inxAddress > 0;
var tskProducts = ParseProductsCatalogPageAsync(address, filenameProductsData, isAppend);
var productsCurrAddress = tskProducts.Result;
for (int i = 0; i < productsCurrAddress.Count; i++)
{
products.Add(new Product
{
Id = productsCurrAddress[i].Id,
Article = productsCurrAddress[i].Article,
Name = productsCurrAddress[i].Name,
Price = productsCurrAddress[i].Price,
SportsName = productsCurrAddress[i].SportsName,
Category = productsCurrAddress[i].Category,
Subcategory = productsCurrAddress[i].Subcategory
});
}
inxAddress++;
}
Console.ReadLine();
}