From 0fc4e536304f6d5f694178611f72a63bb3ed6842 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Tue, 3 Aug 2021 18:54:08 +0100 Subject: [PATCH] Revert "switch over to cloudflare worker" This reverts commit f0d71d11248021d503422f92b8457e5f51352e6f. --- src/lib/scraper/gomostream.js | 2 +- src/lib/scraper/lookmovie.js | 4 ++-- src/views/Search.js | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib/scraper/gomostream.js b/src/lib/scraper/gomostream.js index a784f1f9..07b067e0 100644 --- a/src/lib/scraper/gomostream.js +++ b/src/lib/scraper/gomostream.js @@ -1,6 +1,6 @@ import { unpack } from '../util/unpacker'; -const CORS_URL = 'https://proxy-01.movie-web.workers.dev/?'; +const CORS_URL = 'https://movie-web-proxy.herokuapp.com/'; const BASE_URL = `${CORS_URL}https://gomo.to`; const MOVIE_URL = `${BASE_URL}/movie` const DECODING_URL = `${BASE_URL}/decoding_v3.php` diff --git a/src/lib/scraper/lookmovie.js b/src/lib/scraper/lookmovie.js index 98e4ee8d..9fafd3ce 100644 --- a/src/lib/scraper/lookmovie.js +++ b/src/lib/scraper/lookmovie.js @@ -1,8 +1,8 @@ import Fuse from 'fuse.js' import JSON5 from 'json5' -const CORS_URL = `https://proxy-01.movie-web.workers.dev/?`; -const BASE_URL = `${CORS_URL}https://lookmovie.io`; +const CORS_URL = `https://movie-web-proxy.herokuapp.com`; +const BASE_URL = `${CORS_URL}/https://lookmovie.io`; async function findContent(searchTerm, type) { const searchUrl = `${BASE_URL}/${type}s/search/?q=${encodeURIComponent(searchTerm)}`; diff --git a/src/views/Search.js b/src/views/Search.js index 1eecdce4..836c9088 100644 --- a/src/views/Search.js +++ b/src/views/Search.js @@ -109,16 +109,16 @@ export function SearchView() { } } - // React.useEffect(() => { - // async function fetchHealth() { - // const HOME_URL = "https://proxy-01.movie-web.workers.dev/?" - // await fetch(HOME_URL).catch(() => { - // // Request failed; source likely offline - // setErrorStatus(`Our content provider is currently offline, apologies.`) - // }) - // } - // fetchHealth() - // }, []); + React.useEffect(() => { + async function fetchHealth() { + const HOME_URL = "https://movie-web-proxy.herokuapp.com" + await fetch(HOME_URL).catch(() => { + // Request failed; source likely offline + setErrorStatus(`Our content provider is currently offline, apologies.`) + }) + } + fetchHealth() + }, []); React.useEffect(() => { if (streamRouteMatch) {