Index on how to create hosts and handle urlparser - oe-mirrors/e2iplayer GitHub Wiki

E2iPlayer contains a lot of hosts, and the sites behind them change every day: some die, some move to a new domain or get a new layout, and new interesting sites appear.

One person can't keep up with all of them. That is why it matters that users don't only report what is broken, but also try to fix a host or add a new one. These pages show how a host is built, how the urlparser turns hoster links into streams, and which features a host is expected to support today.

You need some Python and the basics of git (fork, branch, pull request). Everything else is explained here.

Reading order

  1. Adding a new host in E2iplayer - the files of a host, the HelloWorld example, how to test on the box
  2. A more complex example of host: building item lists from HTML - the template host step by step: menus, lists, series, links
  3. Host standard: watched flag, favourites, downloads, names, paging, INFO - what every new host should support, with a checklist
  4. Building a search function
  5. Other example of host: config options, cookies, cloudflare protection and captchas
  6. Understanding Urlparser - how hoster links become streams, adding a hoster
  7. Another new server in urlparser: typical strategies - escaped strings, packed JavaScript, running JavaScript

Templates

The files for these pages are in the repository folder ๐Ÿ”—Wiki-Files:

  • ๐Ÿ”—hostTemplate.py - a complete movie/series host with everything from the host standard. Start new hosts from this file.
  • ๐Ÿ”—hosthelloworld.zip - the smallest possible host with its icons, to see how a host is installed and loaded.

Before you start

  • Check whether the site is already covered by a host (also under another name or in another group) - fixing a host is better than adding a second one.
  • Check that the hosters the site uses are known to the urlparser (IPTVPlayer/libs/urlparser.py, dict hostMap). A site whose videos are only on unsupported hosters needs a hoster resolver first.
  • Read CONTRIBUTING.md - it includes the rules for AI-assisted code.

Questions and help: oATV forum thread or an issue.


Based on the original text by Maxbambi, thank you!

[!TIP] Writing wiki pages: basic writing and formatting syntax ยท emoji cheat sheet