Giter Site home page Giter Site logo

Comments (12)

 avatar commented on May 10, 2024 1

I am already working on this with @TobiGr, here 😄

from documentation.

Stypox avatar Stypox commented on May 10, 2024

From the README:

If you're using Gradle, you could add NewPipe Extractor as a dependency with the following steps:

  1. Add maven { url 'https://jitpack.io' } to the repositories in your build.gradle.
  2. Add compile 'com.github.TeamNewPipe:NewPipeExtractor:v0.11.0'the dependencies in your build.gradle. Replace v0.11.0 with the latest release.

Then to import things from it do import org.schabi.newpipe.extractor.* replacing * with the file/path you want to import.
To get an idea about the usage you can take a look at tests (e.g. this test contains on lines 54-57 the youtube stream extractor initialization and on lines 134-139 how download urls can be retrieved)

I agree that documentation is needed

from documentation.

TobiGr avatar TobiGr commented on May 10, 2024

Maybe someone can write a new chapter about using the extractor outside NewPipe. As @Stypox suggested, it should contain:

  • Build setup
  • initializing the extractor
  • fetching stream info
  • getting download urls

from documentation.

johnny-stevie avatar johnny-stevie commented on May 10, 2024

Thank you very much for the speedy response, I shall try this out and see if it works. Will come back if error occurs again.

from documentation.

johnny-stevie avatar johnny-stevie commented on May 10, 2024

I am having a problem where when I follow the example that @Stypox gave,my nativescript application says that :

ERROR TypeError: Cannot read property 'getInstance' of undefined
JS: ERROR CONTEXT {
JS:   "view": {
JS:     "def": {
JS:       "nodeFlags": 33734657,
JS:       "rootNodeFlags": 33554433,
JS:       "nodeMatchedQueries": 0,
JS:       "flags": 0,
JS:       "nodes": [
JS:         {
JS:           "nodeIndex": 0,
JS:           "parent": null,
JS:           "renderParent": null,
JS:           "bindingIndex": 0,
JS:           "outputIndex": 0,
JS:           "checkIndex": 0,
JS:           "flags": 33554433,
JS:           "childFlags": 180225,
JS:           "directChildFlags": 49153,
JS:           "childMatchedQueries": 0,
JS:           "matchedQueries": {},
JS:           "matchedQueryIds": 0,
JS:           "references": {},
JS:           "ngContentIndex": null,
JS:           "childCount": 3,
JS:           "bindings": [],
JS:           "bindingFlags": 0,
JS:           "outputs": [],
JS:           "element": {
JS:             "ns": "",
JS:             "name": "ActionBar",
JS:             "attrs": [
JS:               [
JS:                 "",
JS:                 "title",
JS:                 "Yt Download"
JS:               ]
JS:             ],
JS:             "template": null,
JS:             "componentProvider": {
JS:               "nodeInd...

I think that it is having difficulty understanding the code around here with getInstance() in the test file:

NewPipe.init(Downloader.getInstance(), new Localization("GB", "en"));
            extractor = (YoutubeStreamExtractor) YouTube
                    .getStreamExtractor("https://www.youtube.com/watch?v=YQHsXMglC9A");
            extractor.fetchPage();

from documentation.

TobiGr avatar TobiGr commented on May 10, 2024

Correct me if I am wrong, but isn't nativescript based on JS? This matches the log.
Cannot read property 'getInstance' of undefined is a JS error. The extractor is written in Java.

from documentation.

johnny-stevie avatar johnny-stevie commented on May 10, 2024

from documentation.

johnny-stevie avatar johnny-stevie commented on May 10, 2024

from documentation.

TheAssassin avatar TheAssassin commented on May 10, 2024

Noone can guarantee transpiled code works. Normally changes are required to make that work. That applies to tools like e.g., emscripten when transpiling larger chunks of code, such as for instance a game engine.

Generally I'd say transpiled code can't be supported by the team. They're trying their best, though. @johnny-stevie I'd recommend you to share your a link to your repository. Please note that this is GPL licensed code, so you're obliged to put your own code under the same library, even if transpiled.

@Stypox @TobiGr is there any quick test code @johnny-stevie could use to check whether the transpiled library works at all?

from documentation.

wb9688 avatar wb9688 commented on May 10, 2024

@johnny-stevie: You shouldn't use the Downloader class, but your implementation of it. See DownloaderImpl in NewPipeExtractor's tests, or DownloaderImpl in NewPipe for 2 different example implementations.

from documentation.

 avatar commented on May 10, 2024

see Using Newpipe Extractor
it might help 😄

from documentation.

Stypox avatar Stypox commented on May 10, 2024

@cloneconf great! Could you contribute the guide you setup to NewPipeExtractor? (I don't know where, maybe in the wiki or maybe directly in the readme, or maybe in this repository, what do you think @TobiGr @litetex ?)

from documentation.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.