From 034720cdad9e7344db4177a6fef89c6b29a5829a Mon Sep 17 00:00:00 2001 From: o5pxels Date: Sat, 10 Apr 2021 14:20:15 -0500 Subject: check.js incomplete implementation, move modules to src, aexport scrape function --- src/scraper/scrape.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/scraper/scrape.js') diff --git a/src/scraper/scrape.js b/src/scraper/scrape.js index 131ae40..a24d1e8 100644 --- a/src/scraper/scrape.js +++ b/src/scraper/scrape.js @@ -1,12 +1,13 @@ const puppeteer = require('puppeteer'); const mongodb = require('mongodb') + // Specifically for scraping // Stores in database once finished scraping // query is the search string (title of movie or show) and the type (music, show, movie) // will be used -async function performSearch(query, type) { +exports.performSearch = async function(query, type) { const browser = await puppeteer.launch({ headless: true }); @@ -29,5 +30,3 @@ async function performSearch(query, type) { // do the database storage await browser.close(); } - -// performSearch('spongebob', 'tv'); \ No newline at end of file -- cgit v1.2.3