From 8fec780a680300102f70a4166187d06fe413f683 Mon Sep 17 00:00:00 2001 From: Wise Colt Date: Sun, 26 Apr 2020 15:31:30 +0300 Subject: [PATCH] bug fix --- lib/index.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/index.js b/lib/index.js index 06c85f3..788e504 100644 --- a/lib/index.js +++ b/lib/index.js @@ -63,8 +63,6 @@ class FlixInfo { const findImdb = ($($('[class="mb-2 rating-container"]')).attr()); const type = netflixLocation == 'tr' ? (body.search("Sezon") > 0 ? 'tv' : 'movie') : (body.search("Season") > 0 ? 'tv' : 'movie'); - console.log(type); - const netflixOverview = ($($('[name="description"]')).attr('content')); const netflixPoster = ($($('[class="img lazyload poster"]')).attr('data-src')); let tmdbURL @@ -86,10 +84,6 @@ class FlixInfo { tmdbURL = theMovieDbURL + 'search/' + type + '?api_key=' + tmdbApiKey + '&language=' + theMovieDbLanguage + '&query=' + title + '&first_air_date_year=' + year; } - console.log(tmdbURL); - - - request(encodeURI(tmdbURL), (err, resultBody, body) => { // Api find all result (for get tmdb id) @@ -111,11 +105,10 @@ class FlixInfo { let result; - if(findImdb){ + if (findImdb) { result = type == 'movie' ? getJson.movie_results : getJson.tv_results - console.log(result); - - }else{ + + } else { result = getJson.results }