Open marcellocurto opened 4 years ago
Awesome @marcellocurto!
Unfortunately I can't make edits to the tutorial, so I will keep this open in case someone else has the same issue.
Hi, I changed the h2 tag to h3 but still got an empty array. @marcellocurto did you get it to work?
It's working now, I changed $('a[href*="/r/news/comments"] > h3').each(function()
to $('a[href*="/r/news/comments"] h3').each(function()
Just remove '>', though I dont know why that is.
I can confirm that "$('a[href*="/r/news/comments"] h3').each(function()..." still works.
Thanks for the great tutorial!
One thing that didn't work was scraping reddit, because they changed the tags of their headlines and wrapped them in another div.
For the code to work at the moment it should probably be something like this:
$('a[href*="/r/news/comments"] h3').each(function()