Open crmn111 opened 8 years ago
Hello @dirkjan111. You can go up in the DOM with jQuery's methods as you do here.
$(this)
should be the element matched by .g.g--f
in the iteration.
Can you find me the dom you are trying to scrape, or even the webpage so I can help you better?
Is it possible to go up in the DOM from whithin a function? I am trying something like this $(this).parents():
When i log out the index of $(this) it is always 0.
artoo.scrape('.g.g--f', { title: {sel: 'a.bdrn.tct'}, category: function($) { //console.log(+$(this).index()); return $(this).parents('.card-section').find('.h3.mbm').html(); }, parts: function ($) { return artoo.scrape($(this).find('.bucket.bucket--flag'), { title: {sel: 'h4'} }); } });