IonicaBizau / scrape-it

🔮 A Node.js scraper for humans.

Home Page:http://ionicabizau.net/blog/30-how-to-write-a-web-scraper-in-node-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to get tags connects all text together

olli208 opened this issue · comments

I want to scrape an article and get the tags. It works except that the tags returned are connected somehow. Here's the code I have:

    scrapeIt(link, {
            tags: '[class^="tag"]'
        }).then(page => {
            console.log(page.data); // returns: "tags: 'CSSWeb DevelopmentFront End Development'"

            return page.data.tags
        });

It should return 'CSS', 'Web Development', 'Front End Development', but I get this instead: CSSWeb DevelopmentFront End Development. I've used this as the link and as you can see on the bottom of the page, it's just a simple ul with li as tags.