I would like to add the “query string” parameter based on my form input of the dot number and then the api call will get data from SimpleScraper.
For some reason, when I add this link as a “source_url” parameter to SimpleScraper, it runs the call and then returns me a result of the fmcsa site with just the first parameter “searchtype=Any” and it never goes through.
APIs are new to me so I’m still learning and I appreciate and insights you might have on this.
Does anyone has experience with other scrapers maybe? Am I appending too many parameters in my source url maybe?
I just did a quick search and are you referring to SimpleScraper that requires a Chrome Extension to run? I’m not familiar with scrapers, but I’m sure this shouldn’t be too hard if they have an API. If they don’t and it requires a chrome extension, that seems a bit more complex.
The problem is when I send a “source_url” to simplescraper, it does not go through with all the parameters. This is more of a simplescraper issue maybe?
You should now be abe to test the scraper by passing a unique URL in the source_url parameter.
Last part is to create the Response to be used in the app. The Scraper returns an array, so we can only work with one value at a time in the pipe. You therefore need to structure it like so:
data.0.NAME <- The name is the property name you named it inside of simpleScraper.
I couldn’t get it to work on my side since SimpeScraper always kept giving me selector errors or access denied errors.
If you share with me your app (moe at tadabase do io) I’d be happy to take a look. Or if you have an API you recommend that can work for this, I can also help further with a video or more on how to implement this pipe.
So I actually got it to work - all the API setup on Pipes I did correctly, but SimpleScraper needed the URL to be sent in as an Encoded URL. So I just sent an encoded url and everything works great now!