Skip to content
This repository has been archived by the owner on Oct 19, 2019. It is now read-only.

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenByteDev committed Feb 20, 2018
1 parent 0b4f4b5 commit e41a652
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 91 deletions.
1 change: 0 additions & 1 deletion docs/_config.yml

This file was deleted.

12 changes: 6 additions & 6 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ <h1> SourceScrapper</h1>
<div class="tsd-panel tsd-typography">
<h1 id="source-scrapper">Source Scrapper</h1>
<p><a href="https://travis-ci.org/OpenByteDev/SourceScrapper"><img src="https://travis-ci.org/OpenByteDev/SourceScrapper.svg?branch=master" alt="Build Status"></a> <a href="https://www.npmjs.com/package/sourcescrapper"><img src="https://badge.fury.io/js/sourcescrapper.svg" alt="npm version"></a>
<a href="https://david-dm.org/OpenByteDev/SourceScrapper"><img src="https://david-dm.org/OpenByteDev/SourceScrapper/status.svg" alt="Dependency Status"></a> <a href="https://david-dm.org/OpenByteDev/SourceScrapper?type=dev"><img src="https://david-dm.org/OpenByteDev/SourceScrapper/dev-status.svg" alt="DevDependency Status"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="License"></a> <a href=""><img src="https://img.shields.io/badge/doge-wow-yellow.svg" alt="DOGE"></a></p>
<a href="https://david-dm.org/OpenByteDev/SourceScrapper"><img src="https://david-dm.org/OpenByteDev/SourceScrapper/status.svg" alt="Dependency Status"></a> <a href="https://david-dm.org/OpenByteDev/SourceScrapper?type=dev"><img src="https://david-dm.org/OpenByteDev/SourceScrapper/dev-status.svg" alt="DevDependency Status"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="License"></a> <a href=""><img src="https://img.shields.io/badge/doge-wow-yellow.svg" alt="Doge"></a></p>
<p>Simple library which helps you to retrieve...</p>
<ul>
<li><p>the source of various video streaming sites</p>
</li>
<li><p>the urls to these streaming sites. </p>
</li>
<li>the source of various video streaming sites</li>
<li>the urls to these streaming sites. </li>
</ul>
<hr>
<h2 id="supported-sites">Supported Sites</h2>
Expand All @@ -92,7 +90,7 @@ <h4 id="hoster">Hoster</h4>
</ul>
<h2 id="getting-started">Getting Started</h2>
<h3 id="installation">Installation</h3>
<pre><code class="lang-bash">npm install sourcescrapper
<pre><code class="lang-bash">$ npm install sourcescrapper
</code></pre>
<h3 id="usage">Usage</h3>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> { scrappers } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'sourcescrapper'</span>);
Expand All @@ -105,6 +103,8 @@ <h3 id="usage">Usage</h3>
<span class="hljs-built_in">console</span>.log(scrap.info.source[<span class="hljs-number">0</span>].url);
})();
</code></pre>
<h3 id="api">API</h3>
<p>The API generated with <a href="http://typedoc.org/">TypeDoc</a> can be found <a href="https://openbytedev.github.io/SourceScrapper/">here</a>.</p>
</div>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
Expand Down
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
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",
Expand Down
96 changes: 48 additions & 48 deletions test/test.js
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);
})();
66 changes: 33 additions & 33 deletions tsconfig.json
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"
]
}

0 comments on commit e41a652

Please sign in to comment.