Refactoring
This commit is contained in:
parent
4d57775ffc
commit
8bc62a6f02
@ -29,12 +29,13 @@ namespace Rehau.Sku.Assist
|
|||||||
return GetProduct(documentTask.Result);
|
return GetProduct(documentTask.Result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IProduct GetProduct(IDocument d)
|
public static IProduct GetProduct(IDocument document)
|
||||||
{
|
{
|
||||||
string script = d.Scripts
|
string script = document
|
||||||
.Where(s => s.InnerHtml.Contains("dataLayer"))
|
.Scripts
|
||||||
.First()
|
.Where(s => s.InnerHtml.Contains("dataLayer"))
|
||||||
.InnerHtml;
|
.First()
|
||||||
|
.InnerHtml;
|
||||||
|
|
||||||
string json = script
|
string json = script
|
||||||
.Substring(script.IndexOf("push(") + 5)
|
.Substring(script.IndexOf("push(") + 5)
|
||||||
|
Loading…
Reference in New Issue
Block a user