Clutch.co Scraper avatar

Clutch.co Scraper

Try for free

7 days trial then $40.00/month - No credit card required now

Go to Store
Clutch.co Scraper

Clutch.co Scraper

epctex/clutchco-scraper
Try for free

7 days trial then $40.00/month - No credit card required now

Unleash the power of data extraction with our Clutch.co Scraper. Gather comprehensive company information, numeric company focus, real client reviews, portfolios, and more from the extensive Clutch.co commercial database. Explore top company listings and perform targeted searches effortlessly.

AA

CSV Export

Closed

agile-acquisition opened this issue
a year ago

When I export to CSV, it creates over 1,000+ columns, most being repetitive.

How can we merge these fields together?

epctex avatar

epctex (epctex)

a year ago

Hey there!

Thank you very much for reaching out and using our actor! Each and every actor that we develop has a parameter called customMapFunction. That parameter allows you to tweak the output per item. I think that would suit your purpose. It is a simple Javascript function that gets an object and returns the new format. If you use it with the Javascript format, it will return the requested data. If you do not have any Javascript experience, please let me know and we can talk about this subject in detail.

Please let me know if there is anything else that I can assist you with. Best

AA

agile-acquisition

a year ago

I do have JavaScript experience.

But there are like 200+ columns I would need to map in order to get the data I want -

Just curious if you have a template/quick code example to get the company name, website url, and location

AA

agile-acquisition

a year ago

Like, the only item that is mapped is the object.websiteUrl

Everything else is undefined in the console and there's no way to see the data output, even with console.log.

Attached is an image of what I'm doing.

epctex avatar

epctex (epctex)

a year ago

Hey again!

Can you please share the last Run that you've tried the customMapFunction? We'll try the same and make it work again. There might be a bug in the code or the customMapFunction might need to be changed. In both of the cases, we'll take care of it. Once you share, I'll talk with the Engineering Team and get back to you shortly.

Best

epctex avatar

epctex (epctex)

a year ago

PS: Unfortunately, the attached image is not shown.

AA

agile-acquisition

a year ago

Run ID: ByHKY7e6sIXsMdyAa

AA

agile-acquisition

a year ago

How about now?

[image: ltp|1696423768907223]

epctex avatar

epctex (epctex)

a year ago

Thank you very much for sharing. Seems like all the requested data of yours are wrapped up on a property called summary. The function below should work:

"(object) => {\n    console.log(object);\n    \n    return {\n    \"companyURL\": object.url,\n    \"companyName\": object.summary.name,\n    \"numReviews\": object.summary.noOfReviews,\n    \"description\": object.summary.description,\n    \"headcount\": object.summary.employees,\n\n    // \"foundedYear\": object.summary.foundedYear.split('Founded ').join('')[1],\n    // \"country\": object.summary.addresses.country,\n    // \"title\": \"headquarters\",\n    // \"street\": \"45 Eisenhower Drive\",\n    // \"locality\": \"Paramus\",\n    // \"region\": \"NJ\",\n    // \"postalCode\": \"07652\",\n    // \"country\": \"United States\",\n    // \"phone\": \"+1.201.870.6000\"\n    // \"title\": \"Think Web. Think Smart. 💡\",\n    // \"rating\": 5,\n    \"websiteUrl\": object.websiteUrl\n}\n}"

Can you please try it out and let me know if everything is working properly on your side? Also one quick note; the console.log will not work since we are evaluating the code pieces safely. All the mapped objects are the ones that are on the dataset.

Best

AA

agile-acquisition

a year ago

[image: Screenshot 2023-10-04 at 8.03.51 AM.png] Everything is still undefined except the object.websiteUrl even using the summary property.

Is there any way I can debug this as a consumer?

[image: ltp|16964246339062033]

epctex avatar

epctex (epctex)

a year ago

Hey again,

Unfortunately, debugging is restricted for the actors. Seems like that is my fault for passing the wrong function. Since we are safely evaluating, some of the usages are also restricted. We just ran a sample on Apify with your input and the correct customMapFunction. Can you please take a look and try it out?

https://console.apify.com/view/runs/bFtfBy3KhgbV8YQyU

Best

AA

agile-acquisition

a year ago

[image: Screenshot 2023-10-04 at 8.38.05 AM.png]

epctex avatar

epctex (epctex)

a year ago

Unfortunately, due to an error on the Apify Platform, I am not able to see any of your attached images.

epctex avatar

epctex (epctex)

a year ago

A quick note that I have to add in here. On the output tab, please click on "All fields" and "JSON" tabs. Otherwise, you will only see what we predefined in the first place. But this doesn't mean that the data isn't there. You can still downloaded the mapped data in CSV.

AA

agile-acquisition

a year ago

Okay, so it exports fine... but man, why does this have to be so difficult. I just need someway to see what the object output is...

Now I am getting the companyName, the description, websiteUrl, headcount, and numReviews... but no matter what I try, I can't figure out how to get the address information on a single line instead of an array. [image: Screenshot 2023-10-04 at 10.27.52 AM.png]

[image: ltp|16964331898899296]

AA

agile-acquisition

a year ago

nvm. Figured it out. Thanks

Developer
Maintained by Community

Actor Metrics

  • 47 monthly users

  • 14 stars

  • 97% runs succeeded

  • Created in Jun 2021

  • Modified 18 hours ago

Categories