JavaScript error: TypeError

gruk

A-Parser Enterprise License
A-Parser Enterprise
Hello,
I'm trying to use the amazon scraper to retrieve product data but always get this error:

JavaScript error: TypeError: Cannot read property 'push' of undefined at Parser.pushProduct


using variables like $product.$i.title and the likes.

What am i doing wrong?

Thanks!
 
It is 1.2.280
I'm adding the variables to the field Results Format, using the default parser prest
 
Please, show me your preset and the requests on which the error occurs.
 
You have several errors at once:
- if you specify a template in the General format of the result, you need to refer to the number of the parser you are using, for example $p1
- for output of arrays, you need to use the .format method
So the correct template will look like this:
Code:
$p1.products.format('$title\n')
I recommend you read these articles in the Documentation:
http://en.a-parser.com/wiki/results-representation/#arrays-of-results
https://en.a-parser.com/wiki/result-format/
http://en.a-parser.com/wiki/template-toolkit/#format-method-for-arrays
 
Thanks a lot, i thought it must have been me. I looked through the wiki but could not find a solution. I have not been careful enough, so i thank you for your help!
 
Back
Top