Parsers

Clean and modify the extracted data before saving or working with it.

The parsing and cleaning step comes after the extraction. While there might be easier scenarios where parsing is not required, it is a common practice for most scrapers.

Consider a scenario where you need to extract an email address from a long paragraph of text, and there's only one selector wrapping the text. In this case, you can easily add a regex parser to remove all the unnecessary text and keep only the email address.

Creating parsers

As you might know at this point, parsers are attached directly to each extractor.

We can create parsers from two places. First, from the dedicated parsers menu on the left sidebar. Or directly in the extractor form using the "+" button which opens a modal window with the same form.

There are parsers for many use cases. For example you can add or remove text, remove whitespace, lower/uppercase, etc.

For the sake of the example, we are going to create a parser to replace mrscraper.com domain with another example.com domain.

Parser type

Select the parser type "text to text". This parser is going to look for the given text and replace it with the new value.

Name your parser

Add a descriptive name for your internal reference. For example, we will give this parser the name of "Replace MrScraper domain".

Text to replace

The text we want to replace: "mrscraper.com".

Replacement text

The new text we want to append: "example.com".

Attaching the parser

If you used the inline form, the parser will be automatically attached to the extractor.

If you created the parser in its section, go back to your scraper, find the parsers input and search and click the newly created parser.

Once you run the scraper, the previous extractions should be now:

{
    "posts": [
        {
            "title": "How to scrape data from a website using no-code (with MrScraper)",
            "link": "https://example.com/blog/how-to-scrape-data-from-a-website-using-no-code-with-MrScraper"
        },
        ...
    ],
}

Time to work

Now that we have the information it's time to work with it. In the next step we explain how you can integrate your extractions.

What people think about scraper icon scraper

Net in hero

The mission to make data accessible to everyone is truly inspiring. With MrScraper, data scraping and automation are now easier than ever, giving users of all skill levels the ability to access valuable data. The AI-powered no-code tool simplifies the process, allowing you to extract data without needing technical skills. Plus, the integration with APIs and Zapier makes automation smooth and efficient, from data extraction to delivery.


I'm excited to see how MrScraper will change data access, making it simpler for businesses, researchers, and developers to unlock the full potential of their data. This tool can transform how we use data, saving time and resources while providing deeper insights.

John

Adnan Sher

Product Hunt user

This tool sounds fantastic! The white glove service being offered to everyone is incredibly generous. It's great to see such customer-focused support.

Ben

Harper Perez

Product Hunt user

MrScraper is a tool that helps you collect information from websites quickly and easily. Instead of fighting annoying captchas, MrScraper does the work for you. It can grab lots of data at once, saving you time and effort.

Ali

Jayesh Gohel

Product Hunt user

Now that I've set up and tested my first scraper, I'm really impressed. It was much easier than expected, and results worked out of the box, even on sites that are tough to scrape!

Kim Moser

Kim Moser

Computer consultant

MrScraper sounds like an incredibly useful tool for anyone looking to gather data at scale without the frustration of captcha blockers. The ability to get and scrape any data you need efficiently and effectively is a game-changer.

John

Nicola Lanzillot

Product Hunt user

Support

Head over to our community where you can engage with us and our community directly.

Questions? Ask our team via live chat 24/5 or just poke us on our official Twitter or our founder. We're always happy to help.