Refactoring

This commit is contained in:
Sergey Chebotar 2021-12-05 21:25:30 +03:00
parent 4d57775ffc
commit 8bc62a6f02

View File

@ -29,12 +29,13 @@ namespace Rehau.Sku.Assist
return GetProduct(documentTask.Result);
}
public static IProduct GetProduct(IDocument d)
public static IProduct GetProduct(IDocument document)
{
string script = d.Scripts
.Where(s => s.InnerHtml.Contains("dataLayer"))
.First()
.InnerHtml;
string script = document
.Scripts
.Where(s => s.InnerHtml.Contains("dataLayer"))
.First()
.InnerHtml;
string json = script
.Substring(script.IndexOf("push(") + 5)