i96751414 / script.flix.magneto Goto Github PK
View Code? Open in Web Editor NEWProvider for Flix, using Torrest
Provider for Flix, using Torrest
Currently the plugin only supports parsing a single page for getting the main rows (results).
The idea is to extend the scraper so it supports fetching results from different pages.
a4kSubtitles works with movies but doesn't work with tv shows it says IMDB ID is not provided
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.
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"
}
}
]
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.
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.
[
{
"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"
}
}
]
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?
With this improvement it will be possible to acquire several magnet links from a single page and it will be possible to use providers that have several magnet links on a single page.
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}",
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.