Breaking down URL into parts

Hello everyone,

I have the following URL format for a scraping automation:

https://www.abcdef.com/companies/country/pg-1/industry.html

I would like to isolate the /pg-1/ section in the URL and increase the number by 1 to move on to the next page at the end of each cycle.

I have managed to isolate the number by using this formula with Set Variable tool: {{split(substring(7.url; indexOf(7.url; “pg-”) + 3); “/”)}}

The output is an array like this:

image

I could not figure out how to:

  • increase the page number by 1 as it is an array
  • loop this cycle to make sure it goes all the way from 1 to 120 without manual intervention

Any ideas?

Welcome to the Make community!

One way to do it is using an Repeater module,

Screenshot_2024-05-31_190534

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

3 Likes