Giter Site home page Giter Site logo

script.flix.magneto's People

Contributors

i96751414 avatar jonian avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

btopbas

script.flix.magneto's Issues

Making use of existing providers

Hello,

Do you have any idea on how to transfer existing providers (say those for the Elementum Burst addon) to the format required by Magneto? I've been trying to think of a way of a programmatic way to do this but given my lack of expertise in the JSON schemas I don't even know where to start.

If you have any idea on what first step could be taken, that'd be amazing.

Thanks.

[resolved] I need help creating a provider

If someone helps me like this, I'll know and I'll be able to add others.

https://comando4kfilmes.org/?s=QUERY
https://comando4kfilmes.org/?s=Iron+man

https://ontorrent.org/?s=QUERY
https://ontorrent.org/?s=Iron+man

https://ontorrent.org/?s=QUERY
https://ontorrent.org/?s=Iron+man

I need help with this part

[
  {
    "name": "Comando 4k filmes",
    "base_url": "https://comando4kfilmes.org",
    "results_parser": {
      "url": "",
      "rows": "'",
      "data": {
        "torrent_url": "",
        "title": "",
        "seeds": "",
        "leeches": "",
        "size": ""
      }
    },
    "additional_parsers": [
      {
        "url": "{torrent_url}",
        "data": {
          "magnet": ""
        }
      }
    ],
    "keywords": {
      "movie": "{title:br} {year}",
      "show": "{title:br}",
      "season": "{title:br} {season:02} temporada",
      "episode": "{title} S{season:02}E{episode:02}"
    },
    "attributes": {
      "color": "FFF14E13",
      "icon": "provider_icons/comando4kfilmes.png"
    }
  }
]

Settings provider detection problem

Here is problem:
My settings.xml:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
    <!-- General -->
    <category label="30000">
    </category>
    <!-- Providers -->
    <category label="30001">
		<setting id="1" type="bool" label="testex" default="<true|false>"/>
    </category>
</settings>

My providers.json:

[
  {
    "name": "testex",
    "base_url": "https://torrentapi.org/pubapi_v2.php",
    "results_parser": {
      "url": "?mode=search&search_string={query:q}&format=json_extended&app_id=script.elementum.burst&token=36gja8ncme",
      "type": "json",
      "rows": "./torrent_results",
      "data": {
        "title": "./title/text()",
        "size": "./size/text()",
        "seeds": "./seeders/text()",
        "leeches": "./leechers/text()",
        "magnet": "./download/text()"
      }
    },
    "keywords": {
      "movie": "{title} {year}",
      "show": "{title}",
      "season": "{title} S{season:02}",
      "episode": "{title} S{season:02}E{episode:02}"
    },
    "attributes": {
      "color": "FFF14E13",
      "icon": "provider_icons/example.png"
    }
  }
]

DEBUG : found key /userdata/addon_data/script.flix.magneto/settings.xml
2020-07-19 19:40:46.931 T:1541736 DEBUG <CAddonSettings[script.flix.magneto]>: loading setting values
2020-07-19 19:40:46.931 T:1541736 DEBUG : requested setting (<provider.id>) was not found.
2020-07-19 19:40:46.931 T:1541736 DEBUG <CAddonSettings[script.flix.magneto]>: failed to find definition for setting <provider.id>. Creating a setting on-the-fly...
2020-07-19 19:40:46.931 T:1541736 DEBUG : requested setting (testex) was not found.

Skip row if parsing failed

page can have rows without a way to identify if row has all needed info. for example, page below has last row as footer, thus it does not have necessary info, but at the same time <tr> tags do not have any good attributes for filtering.

$ python3 provider_test.py xpath --rows ".//table/tr" "td[2]/a/@href" "https://thepiratebay10.org/search/Video%202023/1/99/200"

Traceback (most recent call last):
File "/home/user/.kodi/addons/script.flix.magneto/provider_test.py", line 282, in <module>
main()
File "/home/user/.kodi/addons/script.flix.magneto/provider_test.py", line 278, in main
args.func(args)
File "/home/user/.kodi/addons/script.flix.magneto/provider_test.py", line 99, in xpath
logging.info(parser._xpath_element(element, args.xpath))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.kodi/addons/script.flix.magneto/lib/parsers.py", line 54, in _xpath_element
return self._xpath_find(element, attr_match.group(1)).attrib[attr_match.group(2)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'attrib'

it would make sense to simply skip such rows.

providers.json
[
  {
    "name": "thepiratebay",
    "base_url": "https://thepiratebay10.org",
    "results_parser": {
      "url": "/search/{query:q}/1/99/200",
      "rows": ".//table/tr",
      "data": {
        "magnet": "td[2]/a/@href",
        "title": "td[2]/div/a/text()",
        "seeds": "td[3]/text()",
        "leeches": "td[4]/text()",
        "size": "td[2]/font/text()"
      }
    },
    "keywords": {
      "movie": "{title} {year}",
      "show": "{title}",
      "season": "{title} S{season:02}",
      "episode": "{title} S{season:02}E{episode:02}"
    },
    "attributes": {
      "color": "FFF14E13",
      "icon": "provider_icons/thepiratebay.png"
    }
  }
]

[Support] How do I install and use this addon?

Hello everyone and happy holidays :)

I learned about torrest a few months ago, but I decided to test it yesterday that I had some free time. So, I installed the repo and torrest via the repo. But since torrest only works with magnet/torrent links, which means I had to paste a url at it, I installed flix from the repo so as to be able to browse for movies and series, because all it does is scrapping tmdb. Selecting anything from there returns a "no providers found" message, which brings us to this addon.

Since v17, kodi hides all script.* addons from its menus. Some of them may appear when a search is made, but in general they are all hidden. This means that the addon is not "available" on the repo if someone wants to find it the manual way: (install from repo > select it > locate it under a category.
In turn, the repo itself is "virtual" (as mentioned in the readme), so there is no way to check if the addon is actually there. I have tried opening http://127.0.0.1:{port}/addons.xml (with curl) but no luck. Maybe the port I used there is wrong.
So, I resorted to downloading the entire github repo as a zip and manually installing that one zip!

But it still does not work. Instead of "no providers found" flix now returns "no results found" and this comes up in the log.
IOError: [Errno 2] No such file or directory: u'/storage/.kodi/addons/script.flix.magneto/resources/providers.json'
The mentioned file is indeed missing, so is there something extra that the user has to do in order to make it work?

[SUGGESTION] expand keyword possibilities

The idea of expanding the keyword is to make it possible to use 2 keywords for movies and other options.

Small example:
"movie": "{title:br} {year}",
"movie2": "{title:en} {year}",

"split" function/mutation

jfyi:
$ python3 provider_test.py xpath --rows ".//table/tr" "td[2]/font/text()" "https://thepiratebay10.org/search/Video%202023/1/99/200"
gives
INFO - Uploaded 01-05 14:16, Size 2.06 GiB, ULed by

so "split" function/mutation is needed to parse things like that.

How to setup providers.json if there's no rows

parse JSON

[
{
"Name": "movie name 1",
"Magnet": "magnet link 1"
},
{
"Name": "movie name 2",
"Magnet": "magnet link 2"
}
]

And my providers.json

  "type": "json",
  "rows": "",
  "data": {
    "title": "./Name/text()",
    "magnet": "./Magnet/text()"
  }
But it doesn't work what should be in "rows" in case like this?

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.