-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle bucin after anjay, add neonime shortlink
- Loading branch information
1 parent
6b19f59
commit ad0ce55
Showing
6 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ class Coeg { | |
'siotong', | ||
'telondasmu', | ||
'greget', | ||
'siherp' | ||
'siherp', | ||
'bucin' | ||
] | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const Browser = require('../Browser') | ||
const Util = require('../utils/utils') | ||
const Handler = require('../exceptions/Handler') | ||
|
||
class Neonime { | ||
constructor() { | ||
this.marker = 'neonime.org' | ||
} | ||
|
||
async parse(link) { | ||
const page = await Browser.newOptimizedPage() | ||
|
||
try { | ||
link = decodeURIComponent(link) | ||
await page.goto(link) | ||
|
||
await Util.sleep(9500) | ||
await page.click('#generater') | ||
await Util.sleep(9500) | ||
await page.click('#showlink') | ||
|
||
const finalPage = await Browser.getNewTabPage(page) | ||
await Util.sleep(2000) | ||
const url = finalPage.url() | ||
|
||
await page.close() | ||
await finalPage.close() | ||
|
||
return { | ||
url: url | ||
} | ||
} catch (error) { | ||
await page.close() | ||
|
||
return Handler.error(error) | ||
} | ||
} | ||
} | ||
|
||
module.exports = new Neonime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters