azlyrics-scrape-api
Advanced tools
Comparing version 1.1.9-beta to 1.2.0-beta
@@ -100,3 +100,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
var searchSong = function (q) { return __awaiter(_this, void 0, void 0, function () { | ||
var _a, proxy_list, cookie, formData, data, e_1; | ||
var _a, proxy_list, cookie, formData, data; | ||
return __generator(this, function (_b) { | ||
@@ -115,17 +115,6 @@ switch (_b.label) { | ||
}; | ||
_b.label = 2; | ||
return [4, proxify(formData, cookie)]; | ||
case 2: | ||
_b.trys.push([2, 4, , 5]); | ||
return [4, proxify(formData, cookie)]; | ||
case 3: | ||
data = _b.sent(); | ||
if (data.song.length === 0) | ||
throw new Error({ error: "There is currently no available lyrics on our database for that song!" }); | ||
else | ||
return [2, JSON.parse(data)]; | ||
return [3, 5]; | ||
case 4: | ||
e_1 = _b.sent(); | ||
return [2, e_1]; | ||
case 5: return [2]; | ||
return [2, JSON.parse(data)]; | ||
} | ||
@@ -132,0 +121,0 @@ }); |
@@ -100,3 +100,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
var searchSong = function (q) { return __awaiter(_this, void 0, void 0, function () { | ||
var _a, proxy_list, cookie, formData, data, e_1; | ||
var _a, proxy_list, cookie, formData, data; | ||
return __generator(this, function (_b) { | ||
@@ -115,17 +115,6 @@ switch (_b.label) { | ||
}; | ||
_b.label = 2; | ||
return [4, proxify(formData, cookie)]; | ||
case 2: | ||
_b.trys.push([2, 4, , 5]); | ||
return [4, proxify(formData, cookie)]; | ||
case 3: | ||
data = _b.sent(); | ||
if (data.song.length === 0) | ||
throw new Error({ error: "There is currently no available lyrics on our database for that song!" }); | ||
else | ||
return [2, JSON.parse(data)]; | ||
return [3, 5]; | ||
case 4: | ||
e_1 = _b.sent(); | ||
return [2, e_1]; | ||
case 5: return [2]; | ||
return [2, JSON.parse(data)]; | ||
} | ||
@@ -132,0 +121,0 @@ }); |
{ | ||
"name": "azlyrics-scrape-api", | ||
"version": "1.1.9-beta", | ||
"version": "1.2.0-beta", | ||
"description": "AzLyrics webscraper that returns a promise in JSON format. Another feature of this scraper is that it prevents the anti-bot detection so we can avoid human verifications such as captchas.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33061
425