Merge pull request #33 from MillenniumEarl/deepsource-transform-8c25055d

Format code with prettier
pull/34/head
Millennium Earl 2020-10-20 23:50:35 +02:00 committed by GitHub
commit aece733a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 12 deletions

View File

@ -24,7 +24,8 @@ module.exports.getGameInfo = async function (browser, url) {
if (shared.debug) console.log("Obtaining game info");
// Verify the correctness of the URL
if (!urlsHelper.isF95URL(url)) throw new Error(url + " is not a valid F95Zone URL");
if (!urlsHelper.isF95URL(url))
throw new Error(url + " is not a valid F95Zone URL");
const exists = await urlsHelper.urlExists(url);
if (!exists) return null;

View File

@ -30,7 +30,7 @@ module.exports.getSearchGameResults = async function (browser, gamename) {
await Promise.all([
page.waitForSelector(selectors.SEARCH_FORM_TEXTBOX),
page.waitForSelector(selectors.TITLE_ONLY_CHECKBOX),
page.waitForSelector(selectors.SEARCH_BUTTON)
page.waitForSelector(selectors.SEARCH_BUTTON),
]);
await page.type(selectors.SEARCH_FORM_TEXTBOX, gamename); // Type the game we desire

View File

@ -66,7 +66,7 @@ module.exports.urlExists = async function (url, checkRedirect) {
* @param {String} url URL to check for redirect
* @returns {Promise<String>} Redirect URL or the passed URL
*/
module.exports.getUrlRedirect = async function(url) {
module.exports.getUrlRedirect = async function (url) {
const response = await ky.head(url);
return response.url;
}
};