This repository has been archived by the owner on Oct 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b4f4b5
commit e41a652
Showing
6 changed files
with
91 additions
and
91 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "sourcescrapper", | ||
"version": "0.4.2", | ||
"version": "0.4.1", | ||
"description": "Simple library which helps you to retrieve the source of various video streaming sites. ", | ||
"author": "OpenByte <[email protected]>", | ||
"main": "dist/index.js", | ||
|
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 |
---|---|---|
@@ -1,48 +1,48 @@ | ||
const { config, scrappers, classes: { SourceInfo, HosterInfo } } = require('../dist/index.js'); | ||
|
||
(async () => { | ||
config.showError = true; | ||
|
||
config.puppeteer.headless = true; | ||
//config.puppeteer.executablePath = 'C:\\Users\\Admin\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe'; | ||
config.puppeteer.args = ['--no-sandbox', '--disable-setuid-sandbox']; | ||
|
||
const urls = [ | ||
'https://openload.co/embed/zRpmqpRRaac/YuGiOhArcVEpisode123-rh-480.x.mp4', | ||
'https://oload.tv/embed/fZOeAHeGgcI', | ||
'http://streamcloud.eu/dx008gqtcsdw/jumanji.SD-spectre.mkv.html', | ||
'https://vidzi.tv/8yrmh5ooflp6.html', | ||
'http://vidstreaming.io/streaming.php?id=NzUwMDI=&title=Mob+Psycho+100+Episode+9', | ||
'https://streamango.com/embed/klkflffksmotebqk/YuGiOhArcVEpisode123-rh-343_mp4', | ||
'https://rapidvideo.com/e/FO24ULAW2H', | ||
|
||
'https://ww3.gogoanime.io/death-note-episode-19', | ||
'http://kissanime.ru/Anime/Yu-Gi-Oh-Arc-V-Dub/Episode-123?id=142754&s=default' | ||
]; | ||
|
||
let allSuccess = true; | ||
try { | ||
for (let url of urls) { | ||
const scrapper = scrappers.all.getFirstApplicable(url); | ||
const scrap = await scrapper.run(url); | ||
|
||
const success = | ||
scrap.info && | ||
scrap.info instanceof SourceInfo && scrap.info.source.length > 0 || | ||
scrap.info instanceof HosterInfo && scrap.info.hoster.length > 0; | ||
|
||
console.log(`${scrapper.name}: ${success}`); | ||
|
||
if (!success) | ||
allSuccess = false; | ||
} | ||
} catch (err) { | ||
allSuccess = false; | ||
if (config.showError) | ||
console.error(err); | ||
console.error('Unexpected error during testing'); | ||
} | ||
if (!allSuccess) | ||
process.exit(1); | ||
process.exit(0); | ||
})(); | ||
const { config, scrappers, classes: { SourceInfo, HosterInfo } } = require('../dist/index.js'); | ||
|
||
(async () => { | ||
config.showError = true; | ||
|
||
config.puppeteer.headless = true; | ||
//config.puppeteer.executablePath = 'C:\\Users\\Admin\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe'; | ||
config.puppeteer.args = ['--no-sandbox', '--disable-setuid-sandbox']; | ||
|
||
const urls = [ | ||
'https://openload.co/embed/zRpmqpRRaac/YuGiOhArcVEpisode123-rh-480.x.mp4', | ||
'https://oload.tv/embed/fZOeAHeGgcI', | ||
'http://streamcloud.eu/dx008gqtcsdw/jumanji.SD-spectre.mkv.html', | ||
'https://vidzi.tv/8yrmh5ooflp6.html', | ||
'http://vidstreaming.io/streaming.php?id=NzUwMDI=&title=Mob+Psycho+100+Episode+9', | ||
'https://streamango.com/embed/klkflffksmotebqk/YuGiOhArcVEpisode123-rh-343_mp4', | ||
'https://rapidvideo.com/e/FO24ULAW2H', | ||
|
||
'https://ww3.gogoanime.io/death-note-episode-19', | ||
'http://kissanime.ru/Anime/Yu-Gi-Oh-Arc-V-Dub/Episode-123?id=142754&s=default' | ||
]; | ||
|
||
let allSuccess = true; | ||
try { | ||
for (let url of urls) { | ||
const scrapper = scrappers.all.getFirstApplicable(url); | ||
const scrap = await scrapper.run(url); | ||
|
||
const success = | ||
scrap.info && | ||
scrap.info instanceof SourceInfo && scrap.info.source.length > 0 || | ||
scrap.info instanceof HosterInfo && scrap.info.hoster.length > 0; | ||
|
||
console.log(`${scrapper.name}: ${success}`); | ||
|
||
if (!success) | ||
allSuccess = false; | ||
} | ||
} catch (err) { | ||
allSuccess = false; | ||
if (config.showError) | ||
console.error(err); | ||
console.error('Unexpected error during testing'); | ||
} | ||
if (!allSuccess) | ||
process.exit(1); | ||
process.exit(0); | ||
})(); |
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 |
---|---|---|
@@ -1,34 +1,34 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "esnext", | ||
"outDir": "dist", | ||
"allowJs": false, | ||
"declaration": true, | ||
"declarationDir": "types", | ||
"strict": true, | ||
"typeRoots": ["./node_modules/@types"], | ||
"noImplicitAny": false, | ||
"noImplicitThis": true, | ||
"strictNullChecks": true, | ||
"strictFunctionTypes": true, | ||
"noEmit": false, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"allowSyntheticDefaultImports": true, | ||
"noEmitHelpers": true, | ||
"noEmitOnError": true, | ||
"removeComments": true, | ||
"preserveConstEnums": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"sourceMap": true | ||
}, | ||
"include": [ | ||
"./lib/*" | ||
], | ||
"exclude": [ | ||
"./node_modules" | ||
] | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "esnext", | ||
"outDir": "dist", | ||
"allowJs": false, | ||
"declaration": true, | ||
"declarationDir": "types", | ||
"strict": true, | ||
"typeRoots": ["./node_modules/@types"], | ||
"noImplicitAny": false, | ||
"noImplicitThis": true, | ||
"strictNullChecks": true, | ||
"strictFunctionTypes": true, | ||
"noEmit": false, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"allowSyntheticDefaultImports": true, | ||
"noEmitHelpers": true, | ||
"noEmitOnError": true, | ||
"removeComments": true, | ||
"preserveConstEnums": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"sourceMap": true | ||
}, | ||
"include": [ | ||
"./lib/*" | ||
], | ||
"exclude": [ | ||
"./node_modules" | ||
] | ||
} |