Forum

IPTV FORUM

Register
 

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Python_Admin

Pages: 1 [2] 3 4 ... 17
16
Here is a script to pull M3u8 from UFC.TV videos. You can stream ufc 202.

http://kodim3u.com/script-getting-m3u8-ufc-tv-videos/
Script is in Python3
..........................................................................
#!/usr/bin/env python3
“””
  A simple little script for getting at the m3u8 for ufc.tv videos
  For free and ethical stream viewing free from proprietary players
  Doesn’t circumvent geo-blocks or login requirements
  You can get around the ufc.tv geo blocks via DNS proxies
  I have this saved as ufctv in a bin dir on my $PATH, so I can call it from wherever
  To login, run: ufctv login
  That will begin an interactive login prompt
  The login details themselves aren’t saved, just the cookies for the session
  And the active session is reset any time you login with the “Keep Me Signed In” box anywhere else
  To get a video’s m3u8: ufctv m3u8 $UFCTV-URL
  So for example if I want to go back and watch Belfort vs Hendo 3
  % ufctv m3u8 http://www.ufc.tv/video/belfort-vs-henderson-3
  From there you an do what you wish with the m3u8!
  You may wish to pipe the result direct to mpv (which lets you seek around and switch between qualities)
  % ufctv m3u8 http://www.ufc.tv/video/belfort-vs-henderson-3 | xargs mpv
  Or start ripping with livestreamer
  % ufctv m3u8 http://www.ufc.tv/video/belfort-vs-henderson-3 | xargs -I M3U8 livestreamer hlsvariant://M3U8 best -o belf-vs-hend.ts
  You can also rip the stream with ffmpeg, though I’ve found livestreamer does it a bit cleaner
  You may also wish to expand the program to add commands to do this for you instead of via shell piping
“””
import argparse
import getpass
import json
import os
import pickle
import re
import subprocess
import sys
from requests import session
def main():
    parser = argparse.ArgumentParser(description=
        “””
        This is a command line tool to help enjoy quality UFC Fight Pass
        content in an ethical manner that respects your freedoms
        “””)
    parser.add_argument(‘operation’,
        choices=[‘login’, ‘m3u8’])
    parser.add_argument(‘rest’, nargs=’*’)
    args = parser.parse_args()
    op = args.operation
    if op == ‘login’:
        return ufctv_login()
    if len(args.rest) < 1:
        print(“Missing argument: video_url”, file=sys.stderr)
        return 1
    vid_url = args.rest[0]
    uri = get_m3u8(vid_url)
    if uri is None:
        return 2
    if args.operation == ‘m3u8’:
        print(uri)
        return 0
def fake_mobile_session():
    with session() as c:
        load_cookies(c)
        c.headers.update({‘User-Agent’: (
            “Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us)”
            ” AppleWebKit/528.18 (KHTML, like Gecko)”
            ” Version/4.0 Mobile/7A341 Safari/528.16″)})
        return c
def get_m3u8_by_id(session, vid_id):
    puburi = “http://www.ufc.tv/service/publishpoint?type=video&id={}&format=json”
    r = session.get(puburi.format(vid_id))
    stream_info = json.loads(r.text)
    if ‘path’ not in stream_info:
        return None
    return stream_info[‘path’].replace(“_iphone”, “”)
def get_m3u8(uri):
    with fake_mobile_session() as c:
        r = c.get(uri)
        vid_id = find_video_id(r.text)
        if vid_id is None:
            print(“Failed to find video ID in page.”, file=sys.stderr)
            return None
        if not logged_in(r.text):
            print(“Goof Alert: You are not logged in to UFC.TV”, file=sys.stderr)
        if not video_allowed(r.text):
            print(“Video is not available”, file=sys.stderr)
            return None
        res = get_m3u8_by_id(c, vid_id)
        save_cookies(c)
        return res
ufctv_sesssion_path = os.path.expanduser(“~/.ufctv”)
def save_cookies(session):
    with open(ufctv_sesssion_path, ‘wb’) as f:
        pickle.dump(session.cookies, f)
def load_cookies(session):
    if not os.path.isfile(ufctv_sesssion_path):
        print(“No saved cookies file found — starting from scratch”, file=sys.stderr)
        return
    with open(ufctv_sesssion_path, ‘rb’) as f:
        session.cookies.update(pickle.load(f))
def video_allowed(page_html):
    return ‘<div class=”noAccess”>’ not in page_html
def logged_in(page_html):
    return “Sign Out” in page_html
def ufctv_login():
    with fake_mobile_session() as c:
        login(c)
        save_cookies(c)
def login(sesh):
    username = input(“Please enter your ufc.tv username: “)
    password = getpass.getpass(“Please enter your ufc.tv password: “)
    longchoice = input(“Tick the ‘Keep Me Signed In’ box for a long lasting session? [y/n] “)
    longsesh = ‘true’ if longchoice is ‘y’ else ‘false’
    login = {
        ‘username’: username,
        ‘password’: password,
        ‘cookielink’: longsesh
    }
    r = sesh.post(“https://www.ufc.tv/secure/authenticate”, data=login)
    if ‘loginsuccess’ not in r.text:
        print(“Login failure — full response:\n{}\n”.format(r.text), file=sys.stderr)
        return False
    return True
def find_video_id(page_html):
    m = re.search(“rel=\”image_src\” href=\”.*?([0-9]+?)_.*?\.jpg\””, page_html)
    if m is None:
        return m
    return m.group(1)
if __name__ == “__main__”:
    sys.exit(main())

17
How To Create Kodi Addon / Kodi Addon Creation Guide
« on: July 19, 2016, 12:53:51 PM »
Info Donated by member and credit to its creators!
No need to learn the Python language in order to get this addon kodi. Just follow the steps and in no time your private kodi addon will be in the Matrix1. From ares wizard

Hi all..
Welcome to what i hope will be the beginning of a very special journey for some of you reading this. I only began all this around a year ago and i have gone from strength to strength in my skills, i feel now is the time to start giving something back to the community that in the past, i have learnt so much from..

In the guide we will be making an addon based on youtube, with channels / playlists off the youtube website.

Before we begin, you will need to download and install the software listed below, this guide was formed on windows but the actual steps should be very similar on all platforms.

Paint.net
Winrar
Notepad ++

A working youtube addon zip is here

You will now need to download these template files and extract the folder to your desktop..

Shall we begin..
First of all you need to think of a name for your addon, for this guide we call it "My Addon"

The folder you should rename, without any spaces in the title, in my case "plugin.video.myaddon"

Now inside the folder you will see two images, use paint.net to make yourself an icon and a fanart, the sizes are written on the templates and just save those in place in the folder over writing the old ones.

Next step is to open up the addon.xml, do this by right clicking and then selecting open with notepad ++, as shown below.


Now, we need to edit lines 2,3,5,15 & 16, a breakdown of each is below

2 - Needs to be the same as you named the folder in the first step, in my case "plugin.video.myaddon".
3 - The name as it will display in Kodi on the addon lists, in my case "My Addon".
5 - The name in the Author section of the addons information screen, in my case, "My Name" .
15 & 16 - You fill as u like, a description of the type of content or a link too our forums is always a good shout.

Once done, the addon.xml should look like below, if it does, just hit save.

 https://ares-project.uk/attachments/upload_2016-7-6_12-7-36-png.1031/

Next we need to find a playlist that we would like to add to the addon, so head over to youtube and do a search, once searched, as shown below, use the filters to select playlists

https://ares-project.uk/data/attachments/1/1032-548aba1e0cf849933735aa6e997e60fb.jpg

You should be left with a list of just playlists so pick the one you want to use and grab the url by right clicking on the playlist and selecting "copy link address"

https://ares-project.uk/data/attachments/1/1033-d0bcc29c552942e1671c46e0a415d255.jpg

This gives me the link below. The part we need i have seperated to a new line and highlighted yellow..


https:// www. youtube.com/ watch?v= gUADp1QsyE8&list=

PLgr3JcNZkHshwky2puArJfgA9WKq88L-X

You will also need an image url for the artwork the addon links to the playlist, for this, head to google and do an image search, right click on an image and select "copy image address" as shown below.

upload_2016-7-6_12-10-7.png

this will give u a url like this

http://www.seevibes.com/en/wp-content/uploads/sites/2/2014/04/master-chef-canada-CTV-logo1.jpg

Now we have both of these urls, we can open the default.py in the folder we started with..

line 7, you should edit, again to the same name as your folder, in my case "plugin.video.myaddon"

line 12, the space i have left with ########, needs filling in with the part of the url we highlighted above, so once completed should look like this.
YOUTUBE_CHANNEL_ID_1 = "PLgr3JcNZkHshwky2puArJfgA9WKq88L-X"

line 36, is simply the title of the playlist.

line 38, again, in the space i have filled with #######, the link we took for the image should be pasted into there.. Once all done, you should have something like this below.

https://ares-project.uk/data/attachments/1/1038-5b390b2a7039b01677a21aeab8e50ac4.jpg
You can then save and exit notepad ++..


Are you ready to go test now ?

Close the folder, select with a single click, then right click and choose "add to archive".. then just select ".zip" and press ok

upload_2016-7-6_12-15-19.png

Now head into Kodi and proceed to install your addon just as you would any other from .zip

Like Magic, all working.. Any questions then feel free to post below and ill help u get started, in the near future too im going to add more to the addon and show you a few very basic terms / skills in python that u will need to understand if you are to proceed any further in Kodi's inner workings..

Hope you enjoy this and it explains things in enough detail to get you guys started on your journey..

18
UFC Fights Stream Kodi / UFC 201 Live Stream Kodi
« on: July 18, 2016, 11:34:58 PM »
UFC 201 Live Stream Kodi
Watch UFC 201 live in Kodi for Free. Free PPV event UFC 201 Fight night pass.

http://kodijarvis16.com/ufc-201-live-stream-kodi/

19
UFC Fights Stream Kodi / WHERE TO WATCH UFC 201 KODI
« on: July 18, 2016, 11:25:23 PM »
WHERE TO WATCH UFC 201 KODI
Looking where to watch UFC 201? Here are the top addons to stream live the ufc 201 fight. Fight Night Chicago! Watch Holly Holm in action in hd.

http://kodim3u.com/watch-ufc-201-kodi/
Where to Watch UFC 200 on Kodi
LSW Addon tons on links

BASSFOX Addon in HD

Moneysports in HD

Zem TV – Sports > UniTV Sports > BT Sports 2 link 2 v8

 UK Turk Playlist – Sports > BT Sport 2
Castaway

 AdryanList Addon Live Sports
NJM – Extra Time > BT Sports 2 & Extra Time > Fox Sports 1 USA

 Elite Sports
Evolve Addon
Halow Live – Live Sport > BT Sport 2


 
SportsDevil

Vidtime Addon

Phoenix Addon

 And also on pastebin under UFC 201 M3U

20
UFC Fights Stream Kodi / ufc 201 Fight Card
« on: July 18, 2016, 11:23:06 PM »
Here is the Fight Card for UFC 201
UFC on FOX 20 Fight Card or UFC 201 Fight Card
Holly Holm (10-1) vs. Valentina Shevchenko (12-2)
Edson Barboza (17-4) vs. Gilbert Melendez (22-5)
Francisco Ngannou (7-1) vs. Bojan Mihajlovic (10-3)
Felice Herrig (10-6) vs. Kailin Curran (4-2)
Frankie Saenz (11-3) vs. Eddie Wineland (21-11-1)
Darren Elkins (20-5) vs. Godofredo Pepey (13-3)
Kamaru Usman (7-1) vs.Alexander Yakovlev (23-6-1)
Michel Prazeres (19-2) vs. J.C. Cottrell (17-3)
Alex Oliveira (14-3-1) vs. James Moontasri (9-3)
Hector Urbina (17-9-1) vs. George Sullivan (17-5)
Jim Alers (13-2) vs. Jason Knight (13-2)
Luis Henrique (8-2) vs. Dmitry Smolyakov (8-0)

 

UFC on FOX 20 Start Times/Channels:
Main Card on FOX
Prelims on FOX Sports 1
Prelims on UFC Fight Pass:

http://kodiisengard.com/ufc-201-fight-card-kodi/

21
UFC Fights Stream Kodi / UFC 201 full fight replay
« on: July 18, 2016, 11:21:19 PM »
UFC 201 full fight replay
Fight replay will be posted as soon as it is over. So stay tuned for ufc 201 replay video

http://1stopsite.com/2016/07/09/ufc-200-replay-video-full-kodi/

22
UFC Fights Stream Kodi / UFC 200 4k UHD Broadcast Live Fight
« on: July 08, 2016, 10:07:03 AM »
UFC 200 4k UHD Broadcast Live Fight
This will be the first ufc event to broadcast at a pur 4k or UHD. UFC 200 will be just insane. So do not miss out.
http://kodiisengard.com/saturday-ufc-200-will-firtst-pay-per-view-stream-4k/

23
UFC Fights Stream Kodi / Watch UFC 200 on Kodi
« on: July 07, 2016, 03:08:04 PM »
Looking where to watch ufc 200 on kodi? Take a look here as there are sereval free iptv addons that will have it in good quality.

http://kodi17.com/watch-ufc-200-kodi/

24
UFC Fights Stream Kodi / WHERE TO WATCH UFC 200 KODI
« on: July 03, 2016, 09:26:57 AM »
WHERE TO WATCH UFC 200 KODI
http://kodiisengard.com/live-stream-ufc-200/
For those looking to stream online live the uFC 200 fight, take a look at the ways that you can watch through kodi.

Where to find UFC 200 on Kodi

LSW Addon tons on links

BASSFOX Addon in HD

Moneysports in HD

Zem TV – Sports > UniTV Sports > BT Sports 2 link 2 v8

 
UK Turk Playlist – Sports > BT Sport 2

Castaway

 AdryanList Addon Live Sports
NJM – Extra Time > BT Sports 2 & Extra Time > Fox Sports 1 USA

 Elite Sports
Evolve Addon
Halow Live – Live Sport > BT Sport 2

SportsDevil

Vidtime Addon

Phoenix Addon

And also on pastebin under UFC 200 M3U

25
UFC Fights Stream Kodi / ufc 200 live stream kodi addons
« on: June 18, 2016, 07:51:57 AM »

26
EXTRA ADDONS DOWNLOADS / Kodi Best Adult addon xx movies
« on: June 17, 2016, 09:40:48 PM »
Kodi Best Adult addon xx movies
Cherrypie addon "It is all pink in the middle"  :P

http://kodiwizards.com/2016/06/17/best-adult-addon-kodi-xx-cherrypie/

27
EXTRA ADDONS DOWNLOADS / Fastest kodi Build Tron
« on: June 17, 2016, 09:38:59 PM »
Tron build fastest kodi build. Smallest kodi build as well.

http://kodiwizards.com/2016/06/17/tron-build-wizard-kodi-fastest-build/

28
EXTRA ADDONS DOWNLOADS / The Beast Royalist KODI WIZARDS BUILDS
« on: June 17, 2016, 09:37:13 PM »

New update for Kodi the Beast, the beast kids and the Royalist builds.

https://youtu.be/MiNZt6Roj1w
http://kodiwizards.com/2016/06/17/the-beast-and-royalist-updates-june-17th/

29
UFC Fights Stream Kodi / UFC 200 Live Stream
« on: June 17, 2016, 09:27:14 PM »
UFC 200 Live Stream
Where to watch the ufc 200 fight online and on Kodi. Also, ufc 200 replay video.
http://kodiwizards.com/2016/06/18/watch-ufc-200-online-kodi/

30
UFC Fights Stream Kodi / ufc-199-live-stream-kodi/
« on: June 04, 2016, 12:57:05 PM »

Pages: 1 [2] 3 4 ... 17