Too many operations in a text parser that follows a first text parser

Hello,
I’m a newbie here. I want to scrap a website using text parsers. The first text parsers returns 31 bundles and consumes 1 operation. The following text parser consumes 31 operations. The output for the 31 operations are similar.

The settings of my parsers are similar except for the regex.

How can I only have 1 operation for my second parser?

My ultimate goal is to send the data to a google sheets.

Thank you very much for your support!

Hi @Axel_Lang

The output bundle depends on the regex pattern and the input data. Please adjust the regex accordingly to create a single bundle.

To investigate further, please provide the input data, required output, and the regex pattern you are currently using.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

1 Like

Thank you for your response.

The regex pattern for the first parser is

\s*(.*?)<\/span>\s*<\/h3>

The regex returns the right info:

The second parser also returns the right element but it just creates so many operations.


Every result (item/record) from a match module will output a bundle. To “combine” them into a single structure, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and has applies to many use-cases.

There are other types of aggregator modules, click the below links to find out more:

The Array Aggregator module allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

Here is an example of using the “Target structure type” of an Array Aggregator module:

As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.

2 Likes

Thank you very much for your help. Using the aggregator, I indeed get 1 operation per parser as per the screenshot below

If I want to send this array to google sheet, do I need an iterator?

Thank you everyone for your help. This is the set up of the google sheets module that made it work!


I’m a beginner so it took me a long time to get to it but it’s finally working!

2 Likes