with Webscrape AI and Chattermill?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
webscrape_ai: {
type: "app",
app: "webscrape_ai",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.webscrapeai.com/scrapeWebSite`,
params: {
url: `https://news.ycombinator.com/`,
command: `I want to extract all the news details`,
apiKey: `${this.webscrape_ai.$auth.api_key}`,
schema: `{"author":"string","comments_count":"integer","points":"integer","posted_time":"string","title":"string","url":"url"}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
chattermill: {
type: "app",
app: "chattermill",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.chattermill.com/v1/projects`,
headers: {
Authorization: `Bearer ${this.chattermill.$auth.api_key}`,
},
})
},
})