Deployed da41b6d with MkDocs version: 1.0.4

This commit is contained in:
Christian Schabesberger 2019-07-02 13:24:37 +01:00
parent dbcbf2bad6
commit bc52d25446
59 changed files with 1794 additions and 1748 deletions

7
00_Prepare_everything/index.html Executable file → Normal file
View File

@ -153,10 +153,9 @@
<div class="section"> <div class="section">
<h1 id="before-you-start">Before You Start</h1> <h1 id="before-you-start">Before You Start</h1>
<p>These documents will guide you through the process of creating your own Extractor <p>These documents will guide you through the process of understanding or creating your own Extractor
service of which will enable NewPipe to access additional streaming services, such as the currently supported YouTube and SoundCloud. service of which will enable NewPipe to access additional streaming services, such as the currently supported YouTube, SoundCloud and MediaCCC.
The whole documentation consists of this page, which explains the general concept of the NewPipeExtractor, as well as our The whole documentation consists of this page and <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/">Jdoc</a> setup, which explains the general concept of the NewPipeExtractor.</p>
<a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/">Jdoc</a> setup.</p>
<p><strong>IMPORTANT!!!</strong> This is likely to be the worst documentation you have ever read, so do not hesitate to <p><strong>IMPORTANT!!!</strong> This is likely to be the worst documentation you have ever read, so do not hesitate to
<a href="https://github.com/teamnewpipe/documentation/issues">report</a> if <a href="https://github.com/teamnewpipe/documentation/issues">report</a> if
you find any spelling errors, incomplete parts or you simply don't understand something. We are an open community you find any spelling errors, incomplete parts or you simply don't understand something. We are an open community

77
01_Concept_of_the_extractor/index.html Executable file → Normal file
View File

@ -75,7 +75,7 @@
<li><a class="toctree-l3" href="#collectorextractor-pattern-for-lists">Collector/Extractor Pattern for Lists</a></li> <li><a class="toctree-l3" href="#collectorextractor-pattern-for-lists">Collector/Extractor Pattern for Lists</a></li>
<li><a class="toctree-l3" href="#infoitems-encapsulated-in-pages">InfoItems Encapsulated in Pages</a></li> <li><a class="toctree-l3" href="#listextractor">ListExtractor</a></li>
</ul> </ul>
@ -196,15 +196,16 @@ try {
<h2 id="collectorextractor-pattern-for-lists">Collector/Extractor Pattern for Lists</h2> <h2 id="collectorextractor-pattern-for-lists">Collector/Extractor Pattern for Lists</h2>
<p>Information can be represented as a list. In NewPipe, a list is represented by a <p>Information can be represented as a list. In NewPipe, a list is represented by a
<a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/InfoItemsCollector.html">InfoItemsCollector</a>. <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/InfoItemsCollector.html">InfoItemsCollector</a>.
A InfoItemCollector will collect and assemble a list of <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/InfoItem.html">InfoItem</a>. A InfoItemsCollector will collect and assemble a list of <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/InfoItem.html">InfoItem</a>.
For each item that should be extracted, a new Extractor must be created, and given to the InfoItemCollector via <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/InfoItemsCollector.html#commit-E-">commit()</a>.</p> For each item that should be extracted, a new Extractor must be created, and given to the InfoItemsCollector via <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/InfoItemsCollector.html#commit-E-">commit()</a>.</p>
<p><img alt="InfoItemsCollector_objectdiagram.svg" src="../img/InfoItemsCollector_objectdiagram.svg" /></p> <p><img alt="InfoItemsCollector_objectdiagram.svg" src="../img/InfoItemsCollector_objectdiagram.svg" /></p>
<p>If you are implementing a list for your service you need to extend InfoItem containing the extracted information <p>If you are implementing a list in your service you need to implement an <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/Extractor.html">InfoItemExtractor</a>,
and implement an <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/Extractor.html">InfoItemExtractor</a>, that will be able to retreve data for one and only one InfoItem. This extractor will then be <em>comitted</em> to the <strong>InfoItemsCollector</strong> that can collect the type of InfoItems you want to generate.</p>
that will return the data of one InfoItem.</p>
<p>A common implementation would look like this:</p> <p>A common implementation would look like this:</p>
<pre><code>private MyInfoItemCollector collectInfoItemsFromElement(Element e) { <pre><code>private SomeInfoItemCollector collectInfoItemsFromElement(Element e) {
MyInfoItemCollector collector = new MyInfoItemCollector(getServiceId()); // See *Some* as something like Stream or Channel
// e.g. StreamInfoItemsCollector, and ChannelInfoItemsCollector are provided by NP
SomeInfoItemCollector collector = new SomeInfoItemCollector(getServiceId());
for(final Element li : element.children()) { for(final Element li : element.children()) {
collector.commit(new InfoItemExtractor() { collector.commit(new InfoItemExtractor() {
@ -225,15 +226,21 @@ that will return the data of one InfoItem.</p>
</code></pre> </code></pre>
<h2 id="infoitems-encapsulated-in-pages">InfoItems Encapsulated in Pages</h2> <h2 id="listextractor">ListExtractor</h2>
<p>There is more to know about lists:</p>
<ol>
<li>
<p>When a streaming site shows a list of items, it usually offers some additional information about that list like its title, a thumbnail, <p>When a streaming site shows a list of items, it usually offers some additional information about that list like its title, a thumbnail,
and its creator. Such info can be called <strong>list header</strong>.</p> and its creator. Such info can be called <strong>list header</strong>.</p>
<p>When a website shows a long list of items it usually does not load the whole list, but only a part of it. In order to get more items you may have to click on a next page button, or scroll down. </p> </li>
<p>This is why a list in NewPipe lists are chopped down into smaller lists called <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/ListExtractor.InfoItemsPage.html">InfoItemsPage</a>s. Each page has its own URL, and needs to be extracted separately.</p> <li>
<p>Additional metadata about the list and extracting multiple pages can be handled by a <p>When a website shows a long list of items it usually does not load the whole list, but only a part of it. In order to get more items you may have to click on a next page button, or scroll down.</p>
<a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/ListExtractor.html">ListExtractor</a>, </li>
and its <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/ListExtractor.InfoItemsPage.html">ListExtractor.InfoItemsPage</a>.</p> </ol>
<p>For extracting list header information it behaves like a regular extractor. For handling <code>InfoItemsPages</code> it adds methods <p>Both of these Problems are fixed by the <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/ListExtractor.html">ListExtractor</a> which takes care about extracting additional metadata about the liast,
and by chopping down lists into several pages, so called <a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/ListExtractor.InfoItemsPage.html">InfoItemsPage</a>s.
Each page has its own URL, and needs to be extracted separately.</p>
<p>For extracting list header information a <code>ListExtractor</code> behaves like a regular extractor. For handling <code>InfoItemsPages</code> it adds methods
such as:</p> such as:</p>
<ul> <ul>
<li><a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/ListExtractor.html#getInitialPage--">getInitialPage()</a> <li><a href="https://teamnewpipe.github.io/NewPipeExtractor/javadoc/org/schabi/newpipe/extractor/ListExtractor.html#getInitialPage--">getInitialPage()</a>
@ -245,6 +252,46 @@ such as:</p>
</ul> </ul>
<p>The reason why the first page is handled special is because many Websites such as YouTube will load the first page of <p>The reason why the first page is handled special is because many Websites such as YouTube will load the first page of
items like a regular web page, but all the others as an AJAX request.</p> items like a regular web page, but all the others as an AJAX request.</p>
<p>An InfoItemsPage itself has two constructors which take these parameters:
- The <strong>InfoitemsCollector</strong> of the list that the page should represent
- A <strong>nextPageUrl</strong> which represents the url of the following page (may be null if not page follows).
- Optionally <strong>errors</strong> which is a list of Exceptions that may have happened during extracton.</p>
<p>Here is a simplified reference implementation of a list extractor that only extracts pages, but not metadata:</p>
<pre><code>class MyListExtractor extends ListExtractor {
...
private Document document;
...
public InfoItemsPage&lt;SomeInfoItem&gt; getPage(pageUrl)
throws ExtractionException {
SomeInfoItemCollector collector = new SomeInfoItemCollector(getServiceId());
document = myFunctionToGetThePageHTMLWhatever(pageUrl);
//remember this part from the simple list extraction
for(final Element li : document.children()) {
collector.commit(new InfoItemExtractor() {
@Override
public String getName() throws ParsingException {
...
}
@Override
public String getUrl() throws ParsingException {
...
}
...
}
return new InfoItemsPage&lt;SomeInfoItem&gt;(collector, myFunctionToGetTheNextPageUrl(document));
}
public InfoItemsPage&lt;SomeInfoItem&gt; getInitialPage() {
//document here got initialzied by the fetch() function.
return getPage(getTheCurrentPageUrl(document));
}
...
}
</code></pre>
</div> </div>
</div> </div>

0
02_Concept_of_LinkHandler/index.html Executable file → Normal file
View File

0
03_Implement_a_service/index.html Executable file → Normal file
View File

0
04_Run_changes_in_App/index.html Executable file → Normal file
View File

0
05_releasing/index.html Executable file → Normal file
View File

0
06_documentation/index.html Executable file → Normal file
View File

0
07_maintainers_view/index.html Executable file → Normal file
View File

0
404.html Executable file → Normal file
View File

0
css/github.min.css vendored Executable file → Normal file
View File

0
css/highlight.css Executable file → Normal file
View File

0
css/local_fonts.css Executable file → Normal file
View File

0
css/theme.css Executable file → Normal file
View File

0
css/theme_child.css Executable file → Normal file
View File

0
css/theme_extra.css Executable file → Normal file
View File

0
fonts/Inconsolata-Bold.ttf Executable file → Normal file
View File

0
fonts/Inconsolata-Regular.ttf Executable file → Normal file
View File

0
fonts/Lato-Bold.ttf Executable file → Normal file
View File

0
fonts/Lato-BoldItalic.ttf Executable file → Normal file
View File

0
fonts/Lato-Italic.ttf Executable file → Normal file
View File

0
fonts/Lato-Regular.ttf Executable file → Normal file
View File

0
fonts/RobotoSlab-Bold.ttf Executable file → Normal file
View File

0
fonts/RobotoSlab-Regular.ttf Executable file → Normal file
View File

0
fonts/fontawesome-webfont.eot Executable file → Normal file
View File

0
fonts/fontawesome-webfont.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 193 KiB

0
fonts/fontawesome-webfont.ttf Executable file → Normal file
View File

0
fonts/fontawesome-webfont.woff Executable file → Normal file
View File

0
img/InfoItemsCollector_objectdiagram.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
img/check_path.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

0
img/could_not_decrypt.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

0
img/draft_name.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

0
img/favicon.ico Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

0
img/feature_branch.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

0
img/hotfix_branch.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

0
img/jitpack_fail.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

0
img/kde_in_a_nutshell.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

0
img/merge_into_dev.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

0
img/onedoes.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

0
img/prepare_tests_passed.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

0
img/rebase_back_hotfix.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

0
img/rebase_back_release.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
img/release_branch.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

0
img/select_gradle.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

0
img/select_gradle_wrapper.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

0
img/sync_ok.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
img/termux_files.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

2
index.html Executable file → Normal file
View File

@ -198,5 +198,5 @@ It focuses on making it possible for the creator of a scraper for a streaming se
<!-- <!--
MkDocs version : 1.0.4 MkDocs version : 1.0.4
Build Date UTC : 2019-04-07 17:32:18 Build Date UTC : 2019-07-02 12:24:36
--> -->

0
js/highlight.min.js vendored Executable file → Normal file
View File

0
js/jquery-2.1.1.min.js vendored Executable file → Normal file
View File

0
js/modernizr-2.8.3.min.js vendored Executable file → Normal file
View File

0
js/theme.js Executable file → Normal file
View File

0
media/how_to_jitpack.mp4 Executable file → Normal file
View File

0
search.html Executable file → Normal file
View File

0
search/lunr.js Executable file → Normal file
View File

0
search/main.js Executable file → Normal file
View File

2
search/search_index.json Executable file → Normal file

File diff suppressed because one or more lines are too long

0
search/worker.js Executable file → Normal file
View File

18
sitemap.xml Executable file → Normal file
View File

@ -2,47 +2,47 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-04-07</lastmod> <lastmod>2019-07-02</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-04-07</lastmod> <lastmod>2019-07-02</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-04-07</lastmod> <lastmod>2019-07-02</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-04-07</lastmod> <lastmod>2019-07-02</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-04-07</lastmod> <lastmod>2019-07-02</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-04-07</lastmod> <lastmod>2019-07-02</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-04-07</lastmod> <lastmod>2019-07-02</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-04-07</lastmod> <lastmod>2019-07-02</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-04-07</lastmod> <lastmod>2019-07-02</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
</urlset> </urlset>

BIN
sitemap.xml.gz Executable file → Normal file

Binary file not shown.