summaryrefslogtreecommitdiff
path: root/src/scraper/scrape.js
diff options
context:
space:
mode:
authoro5pxels <o5pxels@gmail.com>2021-04-10 14:20:15 -0500
committero5pxels <o5pxels@gmail.com>2021-04-10 14:20:15 -0500
commit034720cdad9e7344db4177a6fef89c6b29a5829a (patch)
tree3f9f06658cec910f7421765535f85937ba7f2507 /src/scraper/scrape.js
parent41909f9189810df0d005b7c8ecac419d0118037f (diff)
downloadStreamFinder-034720cdad9e7344db4177a6fef89c6b29a5829a.tar.xz
StreamFinder-034720cdad9e7344db4177a6fef89c6b29a5829a.zip
check.js incomplete implementation, move modules to src, aexport scrape function
Diffstat (limited to 'src/scraper/scrape.js')
-rw-r--r--src/scraper/scrape.js5
1 files changed, 2 insertions, 3 deletions
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