Ivars hace 7 años
padre
commit
8c42b86818

+ 111
- 115
PlayStream.wpr Ver fichero

@@ -49,11 +49,7 @@ proj.launch-config = {loc('ContentSources.py'): ('project',
49 49
          ''))}
50 50
 [user attributes]
51 51
 cache.last-mime-type = {loc('unknown:<untitled> #1'): 'text/x-diff'}
52
-debug.breakpoints = {loc('ContentSources.py'): {180L: (0,
53
-        None,
54
-        1,
55
-        0)},
56
-                     loc('gstreamer/player-minimal.py'): {12: (0,
52
+debug.breakpoints = {loc('gstreamer/player-minimal.py'): {12: (0,
57 53
         None,
58 54
         1,
59 55
         0)},
@@ -257,10 +253,6 @@ debug.breakpoints = {loc('ContentSources.py'): {180L: (0,
257 253
         None,
258 254
         1,
259 255
         0),
260
-        237: (0,
261
-              None,
262
-              1,
263
-              0),
264 256
         253: (0,
265 257
               None,
266 258
               1,
@@ -281,10 +273,6 @@ debug.breakpoints = {loc('ContentSources.py'): {180L: (0,
281 273
               None,
282 274
               1,
283 275
               0),
284
-        172: (0,
285
-              None,
286
-              1,
287
-              0),
288 276
         239: (0,
289 277
               None,
290 278
               1,
@@ -5282,86 +5270,14 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5282 5270
                       1,
5283 5271
                       {})],
5284 5272
         'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('ContentSources.py'),
5285
-        {'attrib-starts': [('ContentSources',
5286
-                            14),
5287
-                           ('ContentSources.__init__',
5288
-                            18)],
5289
-         'first-line': 24L,
5273
+        {'attrib-starts': [],
5274
+         'first-line': 132L,
5290 5275
          'folded-linenos': [],
5291
-         'sel-line': 29L,
5292
-         'sel-line-start': 1069L,
5293
-         'selection_end': 1069L,
5294
-         'selection_start': 1069L},
5295
-        1486761569.739],
5296
-        [loc('sources/filmix.py'),
5297
-         {'attrib-starts': [('Source',
5298
-                             27),
5299
-                            ('Source.get_content',
5300
-                             52)],
5301
-          'first-line': 100L,
5302
-          'folded-linenos': [],
5303
-          'sel-line': 114L,
5304
-          'sel-line-start': 4364L,
5305
-          'selection_end': 4436L,
5306
-          'selection_start': 4436L},
5307
-         1486761884.413],
5308
-        [loc('ContentSources.py'),
5309
-         {'attrib-starts': [('ContentSources',
5310
-                             14),
5311
-                            ('ContentSources.__init__',
5312
-                             18)],
5313
-          'first-line': 24L,
5314
-          'folded-linenos': [],
5315
-          'sel-line': 29L,
5316
-          'sel-line-start': 1069L,
5317
-          'selection_end': 1069L,
5318
-          'selection_start': 1069L},
5319
-         1486762152.091],
5320
-        [loc('sources/filmix.py'),
5321
-         {'attrib-starts': [('Source',
5322
-                             27),
5323
-                            ('Source.get_content',
5324
-                             52)],
5325
-          'first-line': 99L,
5326
-          'folded-linenos': [],
5327
-          'sel-line': 107L,
5328
-          'sel-line-start': 4056L,
5329
-          'selection_end': 4159L,
5330
-          'selection_start': 4159L},
5331
-         1486762381.326],
5332
-        [loc('ContentSources.py'),
5333
-         {'attrib-starts': [('ContentSources',
5334
-                             14),
5335
-                            ('ContentSources.__init__',
5336
-                             18)],
5337
-          'first-line': 24L,
5338
-          'folded-linenos': [],
5339
-          'sel-line': 29L,
5340
-          'sel-line-start': 1069L,
5341
-          'selection_end': 1069L,
5342
-          'selection_start': 1069L},
5343
-         1486762398.786],
5344
-        [loc('sources/filmix.py'),
5345
-         {'attrib-starts': [('Source',
5346
-                             27),
5347
-                            ('Source.get_content',
5348
-                             52)],
5349
-          'first-line': 111L,
5350
-          'folded-linenos': [],
5351
-          'sel-line': 119L,
5352
-          'sel-line-start': 4761L,
5353
-          'selection_end': 4761L,
5354
-          'selection_start': 4761L},
5355
-         1486762706.615],
5356
-        [loc('ContentSources.py'),
5357
-         {'attrib-starts': [],
5358
-          'first-line': 132L,
5359
-          'folded-linenos': [],
5360
-          'sel-line': 179L,
5361
-          'sel-line-start': 6130L,
5362
-          'selection_end': 6130L,
5363
-          'selection_start': 6130L},
5364
-         1486762888.109],
5276
+         'sel-line': 179L,
5277
+         'sel-line-start': 6130L,
5278
+         'selection_end': 6130L,
5279
+         'selection_start': 6130L},
5280
+        1486762888.109],
5365 5281
         [loc('sources/filmix.py'),
5366 5282
          {'attrib-starts': [('Source',
5367 5283
                              27),
@@ -5505,9 +5421,78 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5505 5421
           'sel-line-start': 10572L,
5506 5422
           'selection_end': 10572L,
5507 5423
           'selection_start': 10572L},
5508
-         1486766665.611]],
5424
+         1486766665.611],
5425
+        [loc('ContentSources.py'),
5426
+         {'attrib-starts': [('ContentSources',
5427
+                             15),
5428
+                            ('ContentSources.get_streams',
5429
+                             85)],
5430
+          'first-line': 12L,
5431
+          'folded-linenos': [],
5432
+          'sel-line': 105L,
5433
+          'sel-line-start': 4112L,
5434
+          'selection_end': 4112L,
5435
+          'selection_start': 4112L},
5436
+         1486894590.541],
5437
+        [loc('sources/replay.py'),
5438
+         {'attrib-starts': [('Source',
5439
+                             26),
5440
+                            ('Source.get_content',
5441
+                             37)],
5442
+          'first-line': 228L,
5443
+          'folded-linenos': [],
5444
+          'sel-line': 238L,
5445
+          'sel-line-start': 12456L,
5446
+          'selection_end': 12456L,
5447
+          'selection_start': 12456L},
5448
+         1486894642.669],
5449
+        [loc('ContentSources.py'),
5450
+         {'attrib-starts': [],
5451
+          'first-line': 168L,
5452
+          'folded-linenos': [],
5453
+          'sel-line': 179L,
5454
+          'sel-line-start': 6190L,
5455
+          'selection_end': 6190L,
5456
+          'selection_start': 6190L},
5457
+         1486894653.253],
5458
+        [loc('sources/replay.py'),
5459
+         {'attrib-starts': [('Source',
5460
+                             26),
5461
+                            ('Source.get_content',
5462
+                             37)],
5463
+          'first-line': 116L,
5464
+          'folded-linenos': [],
5465
+          'sel-line': 124L,
5466
+          'sel-line-start': 5874L,
5467
+          'selection_end': 5874L,
5468
+          'selection_start': 5874L},
5469
+         1486894676.763],
5470
+        [loc('sources/mtgplay.py'),
5471
+         {'attrib-starts': [('Source',
5472
+                             36),
5473
+                            ('Source.get_content',
5474
+                             47)],
5475
+          'first-line': 169L,
5476
+          'folded-linenos': [],
5477
+          'sel-line': 174L,
5478
+          'sel-line-start': 9111L,
5479
+          'selection_end': 9111L,
5480
+          'selection_start': 9111L},
5481
+         1486894871.572],
5482
+        [loc('sources/iplayer.py'),
5483
+         {'attrib-starts': [('Source',
5484
+                             24),
5485
+                            ('Source.get_streams',
5486
+                             233)],
5487
+          'first-line': 255L,
5488
+          'folded-linenos': [],
5489
+          'sel-line': 266L,
5490
+          'sel-line-start': 13394L,
5491
+          'selection_end': 13394L,
5492
+          'selection_start': 13394L},
5493
+         1486894914.59]],
5509 5494
         20),
5510
-        'current-loc': loc('ContentSources.py'),
5495
+        'current-loc': loc('sources/filmix.py'),
5511 5496
         'editor-state-list': [(loc('plugin.py'),
5512 5497
                                {'attrib-starts': [('main',
5513 5498
         4)],
@@ -5527,16 +5512,13 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5527 5512
                                 'selection_end': 7658L,
5528 5513
                                 'selection_start': 7655L}),
5529 5514
                               (loc('ContentSources.py'),
5530
-                               {'attrib-starts': [('ContentSources',
5531
-        15),
5532
-        ('ContentSources.get_streams',
5533
-         85)],
5534
-                                'first-line': 12L,
5515
+                               {'attrib-starts': [],
5516
+                                'first-line': 168L,
5535 5517
                                 'folded-linenos': [],
5536
-                                'sel-line': 105L,
5537
-                                'sel-line-start': 4112L,
5538
-                                'selection_end': 4112L,
5539
-                                'selection_start': 4112L}),
5518
+                                'sel-line': 179L,
5519
+                                'sel-line-start': 6190L,
5520
+                                'selection_end': 6190L,
5521
+                                'selection_start': 6190L}),
5540 5522
                               (loc('resolver.py'),
5541 5523
                                {'attrib-starts': [('resolve',
5542 5524
         55)],
@@ -5576,12 +5558,12 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5576 5558
         27),
5577 5559
         ('Source.get_streams',
5578 5560
          196)],
5579
-                                'first-line': 0L,
5561
+                                'first-line': 216L,
5580 5562
                                 'folded-linenos': [],
5581
-                                'sel-line': 238L,
5582
-                                'sel-line-start': 10572L,
5583
-                                'selection_end': 10572L,
5584
-                                'selection_start': 10572L}),
5563
+                                'sel-line': 227L,
5564
+                                'sel-line-start': 10158L,
5565
+                                'selection_end': 10158L,
5566
+                                'selection_start': 10158L}),
5585 5567
                               (loc('sources_api/filmix/filmix.txt'),
5586 5568
                                {'attrib-starts': [],
5587 5569
                                 'first-line': 0L,
@@ -5619,8 +5601,19 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5619 5601
                                 'sel-line': 51L,
5620 5602
                                 'sel-line-start': 1647L,
5621 5603
                                 'selection_end': 1725L,
5622
-                                'selection_start': 1647L})],
5623
-        'has-focus': True,
5604
+                                'selection_start': 1647L}),
5605
+                              (loc('sources/iplayer.py'),
5606
+                               {'attrib-starts': [('Source',
5607
+        24),
5608
+        ('Source.get_streams',
5609
+         233)],
5610
+                                'first-line': 255L,
5611
+                                'folded-linenos': [],
5612
+                                'sel-line': 266L,
5613
+                                'sel-line-start': 13394L,
5614
+                                'selection_end': 13394L,
5615
+                                'selection_start': 13394L})],
5616
+        'has-focus': False,
5624 5617
         'locked': False},
5625 5618
         [loc('plugin.py'),
5626 5619
          loc('PlayStream.py'),
@@ -5633,19 +5626,20 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5633 5626
          loc('sources_api/filmix/filmix.txt'),
5634 5627
          loc('sources/cinemalive.py'),
5635 5628
          loc('sources/SourceBase.py'),
5636
-         loc('sources/movieplace.py')]),
5629
+         loc('sources/movieplace.py'),
5630
+         loc('sources/iplayer.py')]),
5637 5631
                                'open_files': [u'PlayStream.py',
5638 5632
         u'playstreamproxy.py',
5639 5633
         u'plugin.py',
5640 5634
         u'resolver.py',
5641 5635
         u'sources/SourceBase.py',
5642 5636
         u'sources/cinemalive.py',
5643
-        u'sources/filmix.py',
5644 5637
         u'sources/movieplace.py',
5645 5638
         u'sources/viaplay.py',
5646 5639
         u'sources_api/filmix/filmix.txt',
5647 5640
         u'util.py',
5648
-        u'ContentSources.py']},
5641
+        u'ContentSources.py',
5642
+        u'sources/filmix.py']},
5649 5643
         'saved_notebook_display': None,
5650 5644
         'split_percents': {0: 0.3093198992443325},
5651 5645
         'splits': 2,
@@ -5660,9 +5654,11 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
5660 5654
                          52,
5661 5655
                          2408,
5662 5656
                          1390)}]}
5663
-guimgr.recent-documents = [loc('ContentSources.py'),
5657
+guimgr.recent-documents = [loc('sources/filmix.py'),
5658
+                           loc('sources/iplayer.py'),
5659
+                           loc('sources/mtgplay.py'),
5660
+                           loc('ContentSources.py'),
5664 5661
                            loc('util.py'),
5665
-                           loc('sources/filmix.py'),
5666 5662
                            loc('sources/movieplace.py'),
5667 5663
                            loc('sources/SourceBase.py'),
5668 5664
                            loc('sources/viaplay.py'),

BIN
release/enigma2-plugin-extensions-playstream_0.6a.ipk Ver fichero


BIN
resolvers/__init__.pyc Ver fichero


BIN
resolvers/aadecode.pyc Ver fichero


BIN
resolvers/hdgo.pyc Ver fichero


BIN
resolvers/hqqresolver.pyc Ver fichero


BIN
resolvers/kapnob.pyc Ver fichero


BIN
resolvers/kodik.pyc Ver fichero


+ 0
- 777
resolvers/openload2.py0 Ver fichero

@@ -1,777 +0,0 @@
1
-# -*- coding: UTF-8 -*-
2
-# /*
3
-# *      Copyright (C) 2015 Lubomir Kucera
4
-# *
5
-# *
6
-# *  This Program is free software; you can redistribute it and/or modify
7
-# *  it under the terms of the GNU General Public License as published by
8
-# *  the Free Software Foundation; either version 2, or (at your option)
9
-# *  any later version.
10
-# *
11
-# *  This Program is distributed in the hope that it will be useful,
12
-# *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
-# *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
-# *  GNU General Public License for more details.
15
-# *
16
-# *  You should have received a copy of the GNU General Public License
17
-# *  along with this program; see the file COPYING.  If not, write to
18
-# *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
-# *  http://www.gnu.org/copyleft/gpl.html
20
-# *
21
-# */
22
-
23
-import re,os,sys
24
-try:
25
-    import util
26
-except:
27
-    pp = os.path.dirname(os.path.abspath(__file__))
28
-    sys.path.insert(0,os.sep.join(pp.split(os.sep)[:-1]))
29
-    import util
30
-import urllib2
31
-from aadecode import AADecoder
32
-
33
-__author__ = 'Jose Riha/Lubomir Kucera'
34
-__name__ = 'openload2'
35
-
36
-
37
-def supports(url):
38
-    #return re.search(r'openload\.\w+/embed/.+', url) is not None
39
-    return False
40
-
41
-
42
-# uses code fragments from https://github.com/LordVenom/venom-xbmc-addons
43
-def resolve(url):
44
-    stream = util.item()
45
-    stream["url"]=get_media_url(url)
46
-
47
-    ### Retrieve subtitles ####
48
-    HTTP_HEADER = {
49
-        'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
50
-        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
51
-        'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
52
-        'Accept-Encoding': 'none',
53
-        'Accept-Language': 'en-US,en;q=0.8',
54
-        'Referer': url}  # 'Connection': 'keep-alive'    
55
-    html = requests.get(url, headers=HTTP_HEADER).content 
56
-    m = re.search('<track kind="captions" src="([^"]+)" srclang="([^"]+)" label="([^"]+)"', html)
57
-    if m:
58
-        stream["subs"] = m.group(1)
59
-        stream["lang"] = m.group(2)   
60
-
61
-    return [stream]
62
-
63
-
64
-txt = """
65
-openload.io urlresolver plugin
66
-Copyright (C) 2015 tknorris
67
-
68
-This program is free software: you can redistribute it and/or modify
69
-it under the terms of the GNU General Public License as published by
70
-the Free Software Foundation, either version 3 of the License, or
71
-(at your option) any later version.
72
-
73
-This program is distributed in the hope that it will be useful,
74
-but WITHOUT ANY WARRANTY; without even the implied warranty of
75
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76
-GNU General Public License for more details.
77
-
78
-You should have received a copy of the GNU General Public License
79
-along with this program. If not, see <http://www.gnu.org/licenses/>.
80
-"""
81
-import urllib
82
-import re
83
-import urllib2
84
-from HTMLParser import HTMLParser
85
-import requests
86
-#from lib.net import Net
87
-#from urlresolver import common
88
-#from urlresolver.resolver import ResolverError
89
-
90
-#net = Net() #III
91
-SIZE_LIMIT = 32 * 1024 * 1024
92
-
93
-def caesar_shift(s, shift=13):
94
-    s2 = ''
95
-    for c in s:
96
-        if c.isalpha():
97
-            limit = 90 if c <= 'Z' else 122
98
-            new_code = ord(c) + shift
99
-            if new_code > limit:
100
-                new_code -= 26
101
-            s2 += chr(new_code)
102
-        else:
103
-            s2 += c
104
-    return s2
105
-
106
-def unpack(html):
107
-    strings = re.findall('{\s*var\s+a\s*=\s*"([^"]+)', html)
108
-    shifts = re.findall('\)\);}\((\d+)\)', html)
109
-    for s, shift in zip(strings, shifts):
110
-        s = caesar_shift(s, int(shift))
111
-        s = urllib.unquote(s)
112
-        for i, replace in enumerate(['j', '_', '__', '___']):
113
-            s = s.replace(str(i), replace)
114
-        html += '<script>%s</script>' % (s)
115
-    return html
116
-
117
-def get_media_url(url):
118
-    HTTP_HEADER = {
119
-        'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
120
-        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
121
-        'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
122
-        'Accept-Encoding': 'none',
123
-        'Accept-Language': 'en-US,en;q=0.8',
124
-        'Referer': url}  # 'Connection': 'keep-alive'
125
-
126
-    #html = net.http_GET(url, headers=HTTP_HEADER).content
127
-    html = requests.get(url, headers=HTTP_HEADER).content
128
-
129
-    try: html = html.encode('utf-8')
130
-    except: pass
131
-    html = unpack(html)
132
-    #match = re.search('''>([^<]+)</span>\s*<span\s+id="streamurl"''', html, re.DOTALL | re.IGNORECASE)
133
-    match = re.search(r'<span[^>]*>([^<]+)</span>\s*<span[^>]*>[^<]+</span>\s*<span[^>]+id="streamurl"', html, re.DOTALL | re.IGNORECASE)
134
-    if not match:
135
-        raise Exception('Stream Url Not Found. Deleted?')
136
-
137
-    hiddenurl = HTMLParser().unescape(match.group(1))
138
-
139
-    decodes = []
140
-    for match in re.finditer('<script[^>]*>(.*?)</script>', html, re.DOTALL):
141
-        encoded = match.group(1)
142
-        match = re.search("(゚ω゚ノ.*?\('_'\);)", encoded, re.DOTALL)
143
-        if match:
144
-            decodes.append(AADecoder(match.group(1)).decode())
145
-
146
-        match = re.search('(.=~\[\].*\(\);)', encoded, re.DOTALL)
147
-        if match:
148
-            decodes.append(JJDecoder(match.group(1)).decode())
149
-
150
-    if not decodes:
151
-        raise Exception('No Encoded Section Found. Deleted?')
152
-
153
-    magic_number = 0
154
-    for decode in decodes:
155
-        match = re.search('charCodeAt\(\d+\)\s*\+\s*(\d+)\)', decode, re.DOTALL | re.I)
156
-        if match:
157
-            magic_number = match.group(1)
158
-            break
159
-
160
-    s = []
161
-    for idx, i in enumerate(hiddenurl):
162
-        j = ord(i)
163
-        if (j >= 33 & j <= 126):
164
-            j = 33 + ((j + 14) % 94)
165
-
166
-        if idx == len(hiddenurl) - 1:
167
-            j += int(magic_number)
168
-        s.append(chr(j))
169
-    res = ''.join(s)
170
-
171
-    videoUrl = 'https://openload.co/stream/{0}?mime=true'.format(res)
172
-    dtext = videoUrl.replace('https', 'http')
173
-    headers = HTTP_HEADER = {
174
-        'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',
175
-        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
176
-        'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
177
-        'Accept-Encoding': 'none',
178
-        'Accept-Language': 'en-US,en;q=0.8',
179
-        'Referer': url}  # 'Connection': 'keep-alive'
180
-    
181
-    req = urllib2.Request(dtext, None, headers)
182
-    res = urllib2.urlopen(req)
183
-    videourl = res.geturl()
184
-    #if int(res.headers['Content-Length']) < SIZE_LIMIT:
185
-        #raise Exception('Openload.co resolve failed. Pigeons?')
186
-    res.close()
187
-
188
-    return videourl
189
-
190
-
191
-
192
-# -*- coding: utf-8 -*-
193
-# ------------------------------------------------------------
194
-# pelisalacarta - XBMC Plugin
195
-# Conector for openload.io
196
-# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
197
-# by DrZ3r0
198
-# ------------------------------------------------------------
199
-# Modified by Shani 
200
-import re
201
-#from urlresolver import common
202
-#import common
203
-
204
-
205
-class AADecoder(object):
206
-    def __init__(self, aa_encoded_data):
207
-        self.encoded_str = aa_encoded_data.replace('/*´∇`*/', '')
208
-
209
-        self.b = ["(c^_^o)", "(゚Θ゚)", "((o^_^o) - (゚Θ゚))", "(o^_^o)",
210
-                  "(゚ー゚)", "((゚ー゚) + (゚Θ゚))", "((o^_^o) +(o^_^o))", "((゚ー゚) + (o^_^o))",
211
-                  "((゚ー゚) + (゚ー゚))", "((゚ー゚) + (゚ー゚) + (゚Θ゚))", "(゚Д゚) .゚ω゚ノ", "(゚Д゚) .゚Θ゚ノ",
212
-                  "(゚Д゚) ['c']", "(゚Д゚) .゚ー゚ノ", "(゚Д゚) .゚Д゚ノ", "(゚Д゚) [゚Θ゚]"]
213
-
214
-    def is_aaencoded(self):
215
-        idx = self.encoded_str.find("゚ω゚ノ= /`m´)ノ ~┻━┻   //*´∇`*/ ['_']; o=(゚ー゚)  =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); ")
216
-        if idx == -1:
217
-            return False
218
-
219
-        is_encoded = self.encoded_str.find("(゚Д゚)[゚o゚]) (゚Θ゚)) ('_');", idx) != -1
220
-        return is_encoded
221
-
222
-    def base_repr(self, number, base=2, padding=0):
223
-        digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
224
-        if base > len(digits):
225
-            base = len(digits)
226
-
227
-        num = abs(number)
228
-        res = []
229
-        while num:
230
-            res.append(digits[num % base])
231
-            num //= base
232
-        if padding:
233
-            res.append('0' * padding)
234
-        if number < 0:
235
-            res.append('-')
236
-        return ''.join(reversed(res or '0'))
237
-
238
-    def decode_char(self, enc_char, radix):
239
-        end_char = "+ "
240
-        str_char = ""
241
-        while enc_char != '':
242
-            found = False
243
-            # for i in range(len(self.b)):
244
-            #    print self.b[i], enc_char.find(self.b[i])
245
-            #    if enc_char.find(self.b[i]) == 0:
246
-            #        str_char += self.base_repr(i, radix)
247
-            #        enc_char = enc_char[len(self.b[i]):]
248
-            #        found = True
249
-            #        break
250
-
251
-            # print 'found', found, enc_char
252
-            if not found:
253
-                for i in range(len(self.b)):
254
-                    enc_char = enc_char.replace(self.b[i], str(i))
255
-                # enc_char = enc_char.replace('(゚Θ゚)', '1').replace('(゚ー゚)', '4').replace('(c^_^o)', '0').replace('(o^_^o)', '3')
256
-                # print 'enc_char', enc_char
257
-                startpos = 0
258
-                findClose = True
259
-                balance = 1
260
-                result = []
261
-                if enc_char.startswith('('):
262
-                    l = 0
263
-
264
-                    for t in enc_char[1:]:
265
-                        l += 1
266
-                        # print 'looping', findClose, startpos, t, balance
267
-                        if findClose and t == ')':
268
-                            balance -= 1
269
-                            if balance == 0:
270
-                                result += [enc_char[startpos:l + 1]]
271
-                                findClose = False
272
-                                continue
273
-                        elif not findClose and t == '(':
274
-                            startpos = l
275
-                            findClose = True
276
-                            balance = 1
277
-                            continue
278
-                        elif t == '(':
279
-                            balance += 1
280
-
281
-                if result is None or len(result) == 0:
282
-                    return ""
283
-                else:
284
-                    for r in result:
285
-                        value = self.decode_digit(r, radix)
286
-                        # print 'va', value
287
-                        str_char += value
288
-                        if value == "":
289
-                            return ""
290
-
291
-                    return str_char
292
-
293
-            enc_char = enc_char[len(end_char):]
294
-
295
-        return str_char
296
-
297
-    def parseJSString(self, s):
298
-        try:
299
-            # print s
300
-            # offset = 1 if s[0] == '+' else 0
301
-            tmp = (s.replace('!+[]', '1').replace('!![]', '1').replace('[]', '0'))  # .replace('(','str(')[offset:])
302
-            val = int(eval(tmp))
303
-            return val
304
-        except:
305
-            pass
306
-
307
-    def decode_digit(self, enc_int, radix):
308
-        # enc_int = enc_int.replace('(゚Θ゚)', '1').replace('(゚ー゚)', '4').replace('(c^_^o)', '0').replace('(o^_^o)', '3')
309
-        # print 'enc_int before', enc_int
310
-        # for i in range(len(self.b)):
311
-        # print self.b[i], enc_char.find(self.b[i])
312
-        # if enc_char.find(self.b[i]) > 0:
313
-        #    str_char += self.base_repr(i, radix)
314
-        #    enc_char = enc_char[len(self.b[i]):]
315
-        #    found = True
316
-        #    break
317
-        #    enc_int=enc_int.replace(self.b[i], str(i))
318
-        # print 'enc_int before', enc_int
319
-
320
-        try:
321
-            return str(eval(enc_int))
322
-        except: pass
323
-        rr = '(\(.+?\)\))\+'
324
-        rerr = enc_int.split('))+')  # re.findall(rr, enc_int)
325
-        v = ""
326
-        # print rerr
327
-        for c in rerr:
328
-            if len(c) > 0:
329
-                # print 'v', c
330
-                if c.strip().endswith('+'):
331
-                    c = c.strip()[:-1]
332
-                # print 'v', c
333
-                startbrackets = len(c) - len(c.replace('(', ''))
334
-                endbrackets = len(c) - len(c.replace(')', ''))
335
-                if startbrackets > endbrackets:
336
-                    c += ')' * (startbrackets - endbrackets)
337
-                if '[' in c:
338
-                    v += str(self.parseJSString(c))
339
-                else:
340
-                    # print c
341
-                    v += str(eval(c))
342
-        return v
343
-
344
-        # unreachable code
345
-        # mode 0=+, 1=-
346
-        # mode = 0
347
-        # value = 0
348
-
349
-        # while enc_int != '':
350
-        #     found = False
351
-        #     for i in range(len(self.b)):
352
-        #         if enc_int.find(self.b[i]) == 0:
353
-        #             if mode == 0:
354
-        #                 value += i
355
-        #             else:
356
-        #                 value -= i
357
-        #             enc_int = enc_int[len(self.b[i]):]
358
-        #             found = True
359
-        #             break
360
-
361
-        #     if not found:
362
-        #         return ""
363
-
364
-        #     enc_int = re.sub('^\s+|\s+$', '', enc_int)
365
-        #     if enc_int.find("+") == 0:
366
-        #         mode = 0
367
-        #     else:
368
-        #         mode = 1
369
-
370
-        #     enc_int = enc_int[1:]
371
-        #     enc_int = re.sub('^\s+|\s+$', '', enc_int)
372
-
373
-        # return self.base_repr(value, radix)
374
-
375
-    def decode(self):
376
-        self.encoded_str = re.sub('^\s+|\s+$', '', self.encoded_str)
377
-
378
-        # get data
379
-        pattern = (r"\(゚Д゚\)\[゚o゚\]\+ (.+?)\(゚Д゚\)\[゚o゚\]\)")
380
-        result = re.search(pattern, self.encoded_str, re.DOTALL)
381
-        if result is None:
382
-            #common.log_utils.log_debug("AADecoder: data not found")
383
-            print "AADecoder: data not foun"
384
-            return False
385
-
386
-        data = result.group(1)
387
-
388
-        # hex decode string
389
-        begin_char = "(゚Д゚)[゚ε゚]+"
390
-        alt_char = "(o゚ー゚o)+ "
391
-
392
-        out = ''
393
-        # print data
394
-        while data != '':
395
-            # Check new char
396
-            if data.find(begin_char) != 0:
397
-                #common.log_utils.log_debug("AADecoder: data not found")
398
-                print "AADecoder: data not found"
399
-                return False
400
-
401
-            data = data[len(begin_char):]
402
-
403
-            # Find encoded char
404
-            enc_char = ""
405
-            if data.find(begin_char) == -1:
406
-                enc_char = data
407
-                data = ""
408
-            else:
409
-                enc_char = data[:data.find(begin_char)]
410
-                data = data[len(enc_char):]
411
-
412
-            radix = 8
413
-            # Detect radix 16 for utf8 char
414
-            if enc_char.find(alt_char) == 0:
415
-                enc_char = enc_char[len(alt_char):]
416
-                radix = 16
417
-
418
-            # print repr(enc_char), radix
419
-            # print enc_char.replace('(゚Θ゚)', '1').replace('(゚ー゚)', '4').replace('(c^_^o)', '0').replace('(o^_^o)', '3')
420
-
421
-            # print 'The CHAR', enc_char, radix
422
-            str_char = self.decode_char(enc_char, radix)
423
-
424
-            if str_char == "":
425
-                #common.log_utils.log_debug("no match :  "),
426
-                print "no match :  "
427
-                #common.log_utils.log_debug(data + "\nout = " + out + "\n")
428
-                print data + "\nout = " + out + "\n"
429
-                return False
430
-            # print 'sofar', str_char, radix,out
431
-
432
-            out += chr(int(str_char, radix))
433
-            # print 'sfar', chr(int(str_char, radix)), out
434
-
435
-        if out == "":
436
-            #common.log_utils.log_debug("no match : " + data)
437
-            print "no match : " + data
438
-            return False
439
-
440
-        return out
441
-
442
-
443
-#
444
-# Python version of the jjdecode function written by Syed Zainudeen
445
-# http://csc.cs.utm.my/syed/images/files/jjdecode/jjdecode.html
446
-#
447
-# +NCR/CRC! [ReVeRsEr] - crackinglandia@gmail.com
448
-# Thanks to Jose Miguel Esparza (@EternalTodo) for the final push to make it work!
449
-#
450
-class JJDecoder(object):
451
-
452
-    def __init__(self, jj_encoded_data):
453
-        self.encoded_str = jj_encoded_data
454
-
455
-    def clean(self):
456
-        return re.sub('^\s+|\s+$', '', self.encoded_str)
457
-
458
-    def checkPalindrome(self, Str):
459
-        startpos = -1
460
-        endpos = -1
461
-        gv, gvl = -1, -1
462
-
463
-        index = Str.find('"\'\\"+\'+",')
464
-
465
-        if index == 0:
466
-            startpos = Str.find('$$+"\\""+') + 8
467
-            endpos = Str.find('"\\"")())()')
468
-            gv = Str[Str.find('"\'\\"+\'+",') + 9:Str.find('=~[]')]
469
-            gvl = len(gv)
470
-        else:
471
-            gv = Str[0:Str.find('=')]
472
-            gvl = len(gv)
473
-            startpos = Str.find('"\\""+') + 5
474
-            endpos = Str.find('"\\"")())()')
475
-
476
-        return (startpos, endpos, gv, gvl)
477
-
478
-    def decode(self):
479
-
480
-        self.encoded_str = self.clean()
481
-        startpos, endpos, gv, gvl = self.checkPalindrome(self.encoded_str)
482
-
483
-        if startpos == endpos:
484
-            raise Exception('No data!')
485
-
486
-        data = self.encoded_str[startpos:endpos]
487
-
488
-        b = ['___+', '__$+', '_$_+', '_$$+', '$__+', '$_$+', '$$_+', '$$$+', '$___+', '$__$+', '$_$_+', '$_$$+', '$$__+', '$$_$+', '$$$_+', '$$$$+']
489
-
490
-        str_l = '(![]+"")[' + gv + '._$_]+'
491
-        str_o = gv + '._$+'
492
-        str_t = gv + '.__+'
493
-        str_u = gv + '._+'
494
-
495
-        str_hex = gv + '.'
496
-
497
-        str_s = '"'
498
-        gvsig = gv + '.'
499
-
500
-        str_quote = '\\\\\\"'
501
-        str_slash = '\\\\\\\\'
502
-
503
-        str_lower = '\\\\"+'
504
-        str_upper = '\\\\"+' + gv + '._+'
505
-
506
-        str_end = '"+'
507
-
508
-        out = ''
509
-        while data != '':
510
-            # l o t u
511
-            if data.find(str_l) == 0:
512
-                data = data[len(str_l):]
513
-                out += 'l'
514
-                continue
515
-            elif data.find(str_o) == 0:
516
-                data = data[len(str_o):]
517
-                out += 'o'
518
-                continue
519
-            elif data.find(str_t) == 0:
520
-                data = data[len(str_t):]
521
-                out += 't'
522
-                continue
523
-            elif data.find(str_u) == 0:
524
-                data = data[len(str_u):]
525
-                out += 'u'
526
-                continue
527
-
528
-            # 0123456789abcdef
529
-            if data.find(str_hex) == 0:
530
-                data = data[len(str_hex):]
531
-
532
-                for i in range(len(b)):
533
-                    if data.find(b[i]) == 0:
534
-                        data = data[len(b[i]):]
535
-                        out += '%x' % i
536
-                        break
537
-                continue
538
-
539
-            # start of s block
540
-            if data.find(str_s) == 0:
541
-                data = data[len(str_s):]
542
-
543
-                # check if "R
544
-                if data.find(str_upper) == 0:  # r4 n >= 128
545
-                    data = data[len(str_upper):]  # skip sig
546
-                    ch_str = ''
547
-                    for i in range(2):  # shouldn't be more than 2 hex chars
548
-                        # gv + "."+b[ c ]
549
-                        if data.find(gvsig) == 0:
550
-                            data = data[len(gvsig):]
551
-                            for k in range(len(b)):  # for every entry in b
552
-                                if data.find(b[k]) == 0:
553
-                                    data = data[len(b[k]):]
554
-                                    ch_str = '%x' % k
555
-                                    break
556
-                        else:
557
-                            break
558
-
559
-                    out += chr(int(ch_str, 16))
560
-                    continue
561
-
562
-                elif data.find(str_lower) == 0:  # r3 check if "R // n < 128
563
-                    data = data[len(str_lower):]  # skip sig
564
-
565
-                    ch_str = ''
566
-                    ch_lotux = ''
567
-                    temp = ''
568
-                    b_checkR1 = 0
569
-                    for j in range(3):  # shouldn't be more than 3 octal chars
570
-                        if j > 1:  # lotu check
571
-                            if data.find(str_l) == 0:
572
-                                data = data[len(str_l):]
573
-                                ch_lotux = 'l'
574
-                                break
575
-                            elif data.find(str_o) == 0:
576
-                                data = data[len(str_o):]
577
-                                ch_lotux = 'o'
578
-                                break
579
-                            elif data.find(str_t) == 0:
580
-                                data = data[len(str_t):]
581
-                                ch_lotux = 't'
582
-                                break
583
-                            elif data.find(str_u) == 0:
584
-                                data = data[len(str_u):]
585
-                                ch_lotux = 'u'
586
-                                break
587
-
588
-                        # gv + "."+b[ c ]
589
-                        if data.find(gvsig) == 0:
590
-                            temp = data[len(gvsig):]
591
-                            for k in range(8):  # for every entry in b octal
592
-                                if temp.find(b[k]) == 0:
593
-                                    if int(ch_str + str(k), 8) > 128:
594
-                                        b_checkR1 = 1
595
-                                        break
596
-
597
-                                    ch_str += str(k)
598
-                                    data = data[len(gvsig):]  # skip gvsig
599
-                                    data = data[len(b[k]):]
600
-                                    break
601
-
602
-                            if b_checkR1 == 1:
603
-                                if data.find(str_hex) == 0:  # 0123456789abcdef
604
-                                    data = data[len(str_hex):]
605
-                                    # check every element of hex decode string for a match
606
-                                    for i in range(len(b)):
607
-                                        if data.find(b[i]) == 0:
608
-                                            data = data[len(b[i]):]
609
-                                            ch_lotux = '%x' % i
610
-                                            break
611
-                                    break
612
-                        else:
613
-                            break
614
-
615
-                    out += chr(int(ch_str, 8)) + ch_lotux
616
-                    continue
617
-
618
-                else:  # "S ----> "SR or "S+
619
-                    # if there is, loop s until R 0r +
620
-                    # if there is no matching s block, throw error
621
-
622
-                    match = 0
623
-                    n = None
624
-
625
-                    # searching for matching pure s block
626
-                    while True:
627
-                        n = ord(data[0])
628
-                        if data.find(str_quote) == 0:
629
-                            data = data[len(str_quote):]
630
-                            out += '"'
631
-                            match += 1
632
-                            continue
633
-                        elif data.find(str_slash) == 0:
634
-                            data = data[len(str_slash):]
635
-                            out += '\\'
636
-                            match += 1
637
-                            continue
638
-                        elif data.find(str_end) == 0:  # reached end off S block ? +
639
-                            if match == 0:
640
-                                raise '+ no match S block: ' + data
641
-                            data = data[len(str_end):]
642
-                            break  # step out of the while loop
643
-                        elif data.find(str_upper) == 0:  # r4 reached end off S block ? - check if "R n >= 128
644
-                            if match == 0:
645
-                                raise 'no match S block n>128: ' + data
646
-                            data = data[len(str_upper):]  # skip sig
647
-
648
-                            ch_str = ''
649
-                            ch_lotux = ''
650
-
651
-                            for j in range(10):  # shouldn't be more than 10 hex chars
652
-                                if j > 1:  # lotu check
653
-                                    if data.find(str_l) == 0:
654
-                                        data = data[len(str_l):]
655
-                                        ch_lotux = 'l'
656
-                                        break
657
-                                    elif data.find(str_o) == 0:
658
-                                        data = data[len(str_o):]
659
-                                        ch_lotux = 'o'
660
-                                        break
661
-                                    elif data.find(str_t) == 0:
662
-                                        data = data[len(str_t):]
663
-                                        ch_lotux = 't'
664
-                                        break
665
-                                    elif data.find(str_u) == 0:
666
-                                        data = data[len(str_u):]
667
-                                        ch_lotux = 'u'
668
-                                        break
669
-
670
-                                # gv + "."+b[ c ]
671
-                                if data.find(gvsig) == 0:
672
-                                    data = data[len(gvsig):]  # skip gvsig
673
-                                    for k in range(len(b)):  # for every entry in b
674
-                                        if data.find(b[k]) == 0:
675
-                                            data = data[len(b[k]):]
676
-                                            ch_str += '%x' % k
677
-                                            break
678
-                                else:
679
-                                    break  # done
680
-                            out += chr(int(ch_str, 16))
681
-                            break  # step out of the while loop
682
-                        elif data.find(str_lower) == 0:  # r3 check if "R // n < 128
683
-                            if match == 0:
684
-                                raise 'no match S block n<128: ' + data
685
-
686
-                            data = data[len(str_lower):]  # skip sig
687
-
688
-                            ch_str = ''
689
-                            ch_lotux = ''
690
-                            temp = ''
691
-                            b_checkR1 = 0
692
-
693
-                            for j in range(3):  # shouldn't be more than 3 octal chars
694
-                                if j > 1:  # lotu check
695
-                                    if data.find(str_l) == 0:
696
-                                        data = data[len(str_l):]
697
-                                        ch_lotux = 'l'
698
-                                        break
699
-                                    elif data.find(str_o) == 0:
700
-                                        data = data[len(str_o):]
701
-                                        ch_lotux = 'o'
702
-                                        break
703
-                                    elif data.find(str_t) == 0:
704
-                                        data = data[len(str_t):]
705
-                                        ch_lotux = 't'
706
-                                        break
707
-                                    elif data.find(str_u) == 0:
708
-                                        data = data[len(str_u):]
709
-                                        ch_lotux = 'u'
710
-                                        break
711
-
712
-                                # gv + "."+b[ c ]
713
-                                if data.find(gvsig) == 0:
714
-                                    temp = data[len(gvsig):]
715
-                                    for k in range(8):  # for every entry in b octal
716
-                                        if temp.find(b[k]) == 0:
717
-                                            if int(ch_str + str(k), 8) > 128:
718
-                                                b_checkR1 = 1
719
-                                                break
720
-
721
-                                            ch_str += str(k)
722
-                                            data = data[len(gvsig):]  # skip gvsig
723
-                                            data = data[len(b[k]):]
724
-                                            break
725
-
726
-                                    if b_checkR1 == 1:
727
-                                        if data.find(str_hex) == 0:  # 0123456789abcdef
728
-                                            data = data[len(str_hex):]
729
-                                            # check every element of hex decode string for a match
730
-                                            for i in range(len(b)):
731
-                                                if data.find(b[i]) == 0:
732
-                                                    data = data[len(b[i]):]
733
-                                                    ch_lotux = '%x' % i
734
-                                                    break
735
-                                else:
736
-                                    break
737
-                            out += chr(int(ch_str, 8)) + ch_lotux
738
-                            break  # step out of the while loop
739
-                        elif (0x21 <= n and n <= 0x2f) or (0x3A <= n and n <= 0x40) or (0x5b <= n and n <= 0x60) or (0x7b <= n and n <= 0x7f):
740
-                            out += data[0]
741
-                            data = data[1:]
742
-                            match += 1
743
-                    continue
744
-            print 'No match : ' + data
745
-            break
746
-        return out
747
-
748
-if __name__ == "__main__":
749
-
750
-    from subprocess import call
751
-    #url = "http://hqq.tv/player/embed_player.php?vid=235238210241210222228241233208212245&autoplay=no"
752
-    #url = "http://hqq.tv/player/embed_player.php?vid=243221241234244238208213206212211231&autoplay=no"
753
-    url = "http://hqq.tv/player/embed_player.php?vid=208231211231207221227243206206221244&autoplay=no"
754
-    #url = "https://openload.co/embed/TMthIdpy4PI/"
755
-    #url = "https://www.youtube.com/watch?v=Tx1K51_F99o"
756
-    #url = "https://www.youtube.com/watch?v=8BkcX7O1890"
757
-    #url = "https://www.youtube.com/watch?v=Se07R8SYsg0"
758
-    #url = "https://kinostok.tv/embed/731f3437e3c53104dd56d04039a0b15a"
759
-    #url = "http://vk.com/video_ext.php?oid=246066565&id=169244575&hash=d430ab0e76c9f7a1&hd=3"
760
-    #url ="https://openload.co/embed/rPMXJYPTkw4/"
761
-    #url = "https://openload.co/embed/bE7WfZ-vz_A/" 
762
-    #url = "https://openload.co/embed/bE7WfZ/" 
763
-    #url = "https://openload.co/embed/OuskaKyC2GU/"
764
-    url = "http://hqq.tv/player/embed_player.php?vid=235238210241210222228241233208212245&autoplay=no"
765
-    url = "https://openload.co/embed/rmNcP-0QopE/"
766
-    url = "https://openload.co/embed/oQLXcU1ITAY/"
767
-    streams = resolve(url)
768
-    if not streams:
769
-        print "No streams found"
770
-        sys.exit()
771
-
772
-    for s in streams:
773
-        print s
774
-
775
-    print streams[0]["url"]    
776
-    call([r"c:\Program Files\VideoLAN\VLC\vlc.exe",streams[0]["url"]])
777
-    pass

BIN
resolvers/openload2.pyc Ver fichero


BIN
resolvers/openload3.pyc Ver fichero


+ 0
- 0
resolvers/util.py.rsls Ver fichero


+ 0
- 0
resolvers/util.pyc.rsls Ver fichero


BIN
resolvers/youtuberesolver.pyc Ver fichero


BIN
sources/SourceBase.pyc Ver fichero


BIN
sources/YouTubeVideoUrl.pyc Ver fichero


BIN
sources/__init__.pyc Ver fichero


BIN
sources/cinemalive.pyc Ver fichero


BIN
sources/config.pyc Ver fichero


+ 1
- 1
sources/euronews.cfg Ver fichero

@@ -1,3 +1,3 @@
1 1
 [euronews]
2
-language = ru
2
+language = en
3 3
 

BIN
sources/euronews.pyc Ver fichero


BIN
sources/filmix.pyc Ver fichero


BIN
sources/filmon.pyc Ver fichero


BIN
sources/iplayer.pyc Ver fichero


BIN
sources/jsinterp.pyc Ver fichero


+ 0
- 202
sources/kinofilmnet.py Ver fichero

@@ -1,202 +0,0 @@
1
-#!/usr/bin/env python
2
-# coding=utf8
3
-#
4
-# This file is part of PlayStream - enigma2 plugin to play video streams from various sources
5
-# Copyright (c) 2016 ivars777 (ivars777@gmail.com)
6
-# Distributed under the GNU GPL v3. For full terms see http://www.gnu.org/licenses/gpl-3.0.en.html
7
-#
8
-try:
9
-    import json
10
-except:
11
-    import simplejson as json
12
-import urllib2, urllib
13
-import datetime, re, sys,os
14
-import ConfigParser
15
-from collections import OrderedDict
16
-from SourceBase import SourceBase
17
-import resolver
18
-import util
19
-
20
-headers2dict = lambda  h: dict([l.strip().split(": ") for l in h.strip().splitlines()])
21
-import HTMLParser
22
-h = HTMLParser.HTMLParser()
23
-    
24
-class Source(SourceBase):
25
-    
26
-    def __init__(self,country=""):
27
-        self.name = "kinofilmnet"
28
-        self.title = "KinoFilmNet.lv"
29
-        self.img = "http://kinofilmnet.lv/MusuBaneri/1268.png"
30
-        self.desc = "Kinofilmnet.lv satura skatīšanās"
31
-        self.country=country
32
-        self.headers = headers2dict("""
33
-User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
34
-Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
35
-Accept-Language: en-US,en;q=0.5
36
-""")
37
-        self.headers2 = headers2dict("""
38
-User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
39
-X-Requested-With: XMLHttpRequest
40
-Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
41
-""")
42
-        self.url = "http://kinofilmnet.lv/"
43
-
44
-
45
-    ######### Entry point ########        
46
-    def get_content(self, data):
47
-        print "[kinofilmnet] get_content:", data
48
-        source,data,path,plist,clist,params,qs = self.parse_data(data)
49
-        content=[]
50
-        content.append(("..return", "back","","Return back"))
51
-        
52
-        if clist=="home":
53
-            content.extend([
54
-                ("Meklēt", "kinofilmnet::search/?q={0}","","Meklēt"),                
55
-                ("Jaunākās", "kinofilmnet::jaunakas","","Visu žanru jaunākās filmas"),
56
-                ("Top50", "kinofilmnet::top50","","Top 50 filmas"),
57
-            ])
58
-            r = self.call("")
59
-            i = r.find('<div class="cat-title">Meklēt pēc žanriem</div>')
60
-            if i<=0:
61
-                return content
62
-            for item in re.findall('<li><a href=".*load/([^"]+)">([^<]+)</a></li>', r[i:]):
63
-                title = item[1]
64
-                data2 = "filmas/" + item[0]
65
-                img = self.img
66
-                desc = title
67
-                content.append((title,self.name+"::"+data2,img,desc))      
68
-            return content
69
-    
70
-        elif clist=="search":
71
-            r=self.call(data)
72
-            result = re.findall('<a href="([^"]+)"> (.+?) </a></div>.+?> (.+?)</div>', r, re.DOTALL)            
73
-            for item in result:
74
-                title = item[1].replace("<b>","").replace("</b>","")
75
-                data2 = item[0].replace("http://kinofilmnet.lv/","")
76
-                img = self.img
77
-                desc = item[2].replace("<b>","").replace("</b>","")
78
-                content.append((title,self.name+"::"+data2,img,desc))
79
-            if '<span>&raquo;</span>' in r:
80
-                m = re.search("p=(\d+)",data)
81
-                if m:
82
-                    page = int(m.group(1))+1
83
-                    data2 = re.sub(r"p=\d+", r"p=%s"%page, data)
84
-                    content.append(("Next page",self.name+"::"+data2,self.img,"Next page"))               
85
-            return content
86
-            
87
-        # Žanru saraksti ##
88
-        elif clist in ("jaunakas","top50") or clist=="filmas" and len(plist)==3:
89
-            if clist == "jaunakas":
90
-                r = self.call("")
91
-            else:
92
-                r = self.call(data)
93
-            #r = r.decode("cp1251").encode("utf8")
94
-            result = re.findall(r'<div id="entryID\w+">.+?<img src="([^"]+)" alt="([^"]+)".+?data-link="([^"]+)".+?<span>([^<]*)</span>.+?<div class="movie-date">([^<]+)</div>.+?<div class="movie-director"><b>Žanrs:</b> ([^<]+)</div>.+?<div class="movie-text">([^<]+)</div>', r, re.DOTALL)
95
-            for item in result:
96
-                title = item[1]+"[%s]"%item[3]
97
-                img = "http://kinofilmnet.lv"+item[0]
98
-                data2 = item[2][1:]
99
-                desc = "%s %s\n%s"%(item[4],item[5],item[6])
100
-                content.append((title,self.name+"::"+data2,img,desc))                      
101
-            m = re.search('href="/([^"]+)" onclick="[^"]+" ><span>&raquo;', r, re.DOTALL)
102
-            if m:
103
-                data2 = m.group(1)
104
-                content.append(("Next page",self.name+"::"+data2,self.img,"Next page"))    
105
-            return content      
106
-         
107
-        ### Seriāls ###
108
-        elif clist=="filmas" and len(plist)==4:
109
-            r = self.call(path)
110
-            title0 = re.search("<h1>([^<]+)</h1>", r, re.DOTALL).group(1)
111
-            desc0 = re.search('<div class="m-desc full-text clearfix">([^<]+)</div>', r, re.DOTALL).group(1)
112
-            img0 = "http://kinofilmnet.lv" + re.search('<div class="m-img">.*?<img src="([^"]+)" alt', r, re.DOTALL).group(1)
113
-            result = re.findall(r'<summary>([^<]+)</summary><iframe src="https://openload\.co/embed/[^/]+/"', r, re.DOTALL)
114
-            i = 1
115
-            for item in result:
116
-                title = title0+" - " + item
117
-                data2 = data+"?s=%s"%i
118
-                img = img0
119
-                desc = desc0
120
-                content.append((title,self.name+"::"+data2,img,desc))                                      
121
-                i += 1
122
-            return content                    
123
-            
124
-        ### kaut kas neparedzets ###
125
-        else:
126
-            return content                            
127
-              
128
-    def is_video(self,data):
129
-        source,data,path,plist,clist,params,qs = self.parse_data(data)
130
-        if clist=="filmas" and len(plist) == 4 and "s"in qs:
131
-            return True
132
-        if not (clist=="filmas" and len(plist) == 4):
133
-            return False
134
-        if "sezona" in data:
135
-            return False
136
-        r = self.call(path)
137
-        result = re.findall(r'iframe src="https://openload\.co/embed/[^/]+/"', r, re.DOTALL)
138
-        if len(result)>1:
139
-            return False
140
-        else:
141
-            return True
142
-
143
-        
144
-    def call(self, data,params=None,headers=None,lang=""):
145
-        if not headers: headers = self.headers
146
-        url = self.url+data
147
-        result = self._http_request(url,params,headers=headers)
148
-        return result
149
-      
150
-    def get_streams(self,data):
151
-        print "[kinofilmnet] get_streams:", data
152
-        #if not self.is_video(data):
153
-            #return []
154
-        source,data,path,plist,clist,params,qs = self.parse_data(data)
155
-        r = self.call(path)
156
-        title = re.search("<h1>([^<]+)</h1>", r, re.DOTALL).group(1)
157
-        desc = re.search('<div class="m-desc full-text clearfix">([^<]+)</div>', r, re.DOTALL).group(1)
158
-        img = "http://kinofilmnet.lv" + re.search('<div class="m-img">.*?<img src="([^"]+)" alt', r, re.DOTALL).group(1)
159
-        if "s" in qs: # serialā sērija
160
-            result = re.findall(r'<summary>([^<]+)</summary><iframe src="([^"]+)"', r, re.DOTALL)
161
-            i = int(qs["s"])-1
162
-            url0 = result[i][1]
163
-            title = title + " - " + result[i][0]
164
-        else:
165
-            #iframe src="https://openload.co/embed/wlw6Vl9zwL0/" 
166
-            result = re.findall(r'<iframe src="([^"]+)"', r, re.DOTALL)
167
-            if not result:
168
-                return []
169
-            url0 = result[0]
170
-        streams =  resolver.resolve(url0)
171
-        for s in streams:
172
-            if "hqq." in url0 or "goo.gl" in url0:
173
-                s["url"] = util.streamproxy_encode(s["url"],s["headers"])
174
-                s["headers"]={}
175
-            s["name"] = title
176
-            s["desc"] = desc
177
-            s["img"] = img
178
-            s["type"] = self.stream_type(s["url"])
179
-            #s["lang"] = lang        
180
-        return streams
181
-        
182
-if __name__ == "__main__":
183
-    country= "lv"
184
-    c = Source(country)
185
-    if len(sys.argv)>1:
186
-        data= sys.argv[1]
187
-    else:
188
-        data = "home"
189
-    content = c.get_content(data)
190
-    for item in content:
191
-        print item
192
-    #cat = api.get_categories(country)
193
-    #chan = api.get_channels("lv")
194
-    #prog = api.get_programs(channel=6400)
195
-    #prog = api.get_programs(category=55)
196
-    #seas = api.get_seasons(program=6453)
197
-    #str = api.get_streams(660243)
198
-    #res = api.get_videos(802)
199
-    #formats = api.getAllFormats()
200
-    #det = api.detailed("1516")
201
-    #vid = api.getVideos("13170")
202
-    pass

BIN
sources/kinofilmnet.pyc Ver fichero


+ 3
- 2
sources/ltc.cfg Ver fichero

@@ -1,3 +1,4 @@
1 1
 [ltc]
2
-user=ivars777
3
-password=kaskade7
2
+user = lietotajs
3
+password = parole
4
+

BIN
sources/ltc.pyc Ver fichero


BIN
sources/movieplace.pyc Ver fichero


BIN
sources/mtgplay.pyc Ver fichero


BIN
sources/play24.pyc Ver fichero


BIN
sources/replay.pyc Ver fichero


BIN
sources/serialguru.pyc Ver fichero


+ 14
- 29
sources/streams.cfg Ver fichero

@@ -4,22 +4,22 @@ My TV archive|config::my_archive|default|Mani TV arhīvu video
4 4
 My Video|config::my_video||Mani video
5 5
 My Kids|config::my_kids||Mani bērnu video
6 6
 My Radio|config::my_radio||Mani radio kanāli
7
-Replay.lv (LTV)|replay::home|http://replay.lsm.lv/apple-touch-icon.png|LSM replay.lv satura skatīšanās
8
-Skaties.lv (TV3)|mtgplay::home|http://skaties.lv/touch-icon-192x192.png|MTG skaties.lv satura skatīšanās (LNT,TV3, TV6 u.c.)
9
-Shortcut (lattelecom.tv)|ltc::home|picons/shortcut.png|lattelecom.tv satura skatīšanās
10
-Play24.lv (Riga24TV)|play24::home|http://play24.lv/images/play24-logo-black.png|play24.lv (Riga24TV) satura skatīšanās
11
-TVDom.tv|tvdom::home|https://tvdom.tv/front/assets/images/logo.png|TVDom.tv satura skatīšanās
12
-BBC iPlayer|iplayer::home|http://www.userlogos.org/files/logos/inductiveload/BBC_iPlayer_logo.png|BBC iPlayer portal content
13
-Euronews|euronews::home|http://pbs.twimg.com/profile_images/732665354242150400/tZsCnjuh_400x400.jpg|Euronews live and archive
14
-KinoFilmNet.lv|kinofilmnet::home|https://pbs.twimg.com/profile_images/743461209563791361/08RooARb.jpg|Kinofilmnet.lv satura skatīšanās
15
-cinemalive.tv|cinemalive::home|https://cinemalive.tv/assets/img/filmas-online-latviski.jpg|cinemalive.tv satura skatīšanās
16
-Filmix.net|filmix::home|http://cs5324.vk.me/g33668783/a_903fcc63.jpg|Filmix.net satura skatīšanās
17
-SerialGURU.ru|serialguru::home|http://serialguru.ru/images/xlogo_new.png.pagespeed.ic.0sre2_2OJN.png|Serialguru.ru portāla satura skatīšanās
7
+Replay.lv (LTV)|replay::home|http://replay.lsm.lv/apple-touch-icon.png|Latvijas TV tiešraides un arhīvs
8
+Skaties.lv (TV3)|mtgplay::home|http://skaties.lv/touch-icon-192x192.png|MTG kanālu (LNT,TV3, TV6 u.c.) arhīvs
9
+Shortcut (lattelecom.tv)|ltc::home|https://kursors.lv/wp-content/uploads/2016/07/Shortcut-logo.png|lattelecom TV, arhīves un video
10
+Play24.lv (Riga24TV)|play24::home|http://play24.lv/images/play24-logo-black.png|play24.lv (Riga24TV)tiešraide un arhīvs
11
+viaplay.lv|viaplay::home|https://yt3.ggpht.com/-noVdjbNR-V8/AAAAAAAAAAI/AAAAAAAAAAA/yZ9XNP5urLY/s900-c-k-no-mo-rj-c0xffffff/photo.jpg|Viaplay.lv - filmas latviešu, krievu u.c. valodās
12
+TVDom.tv|tvdom::home|https://tvdom.tv/front/assets/images/logo.png|PBK tiešraides un arhīvs
13
+BBC iPlayer|iplayer::home|http://www.userlogos.org/files/logos/inductiveload/BBC_iPlayer_logo.png|BBC live streams and arhive
14
+Euronews|euronews::home|http://pbs.twimg.com/profile_images/732665354242150400/tZsCnjuh_400x400.jpg|Euronews live streams and archive
15
+cinemalive.tv|cinemalive::home|https://cinemalive.tv/assets/img/filmas-online-latviski.jpg|cinemalive.tv - flmas  latvišu valodā
16
+MoviePlace.lv|movieplace::home||Movieplace.lv - filmas latviesu valodā
17
+Filmix.net|filmix::home|http://cs5324.vk.me/g33668783/a_903fcc63.jpg|Filmix.net - filmas krievu valodā
18
+SerialGURU.ru|serialguru::home|http://serialguru.ru/images/xlogo_new.png.pagespeed.ic.0sre2_2OJN.png|Serialguru.ru - filmas krievu valodā
18 19
 USTVNow|ustvnow::home|http://watch.ustvnow.com/assets/ustvnow/img/ustvnow_og_image.png|USTVNow kanālu tiešraide
19
-FilmOn|filmon::home|http://behindthegloves.com/wp-content/uploads/2016/01/FilmOn-logo1.jpg|FilmOn portāla satura skatīšanās
20
+FilmOn|filmon::home|http://behindthegloves.com/wp-content/uploads/2016/01/FilmOn-logo1.jpg|FilmOn - tiešraides un video (dažādās valodās)
20 21
 MTGPlay|config::mtg|https://www.mtg.com/wp-content/uploads/2015/11/MTG-Logo-Medium-Red-PNG.png|Other countries MTG media portals content
21
-viaplay.lv|viaplay::home|https://yt3.ggpht.com/-noVdjbNR-V8/AAAAAAAAAAI/AAAAAAAAAAA/yZ9XNP5urLY/s900-c-k-no-mo-rj-c0xffffff/photo.jpg|Viplay.lv saturs
22
-MoviePlace.lv|movieplace::home||Movieplace.lv - filmas latviesu valodā
22
+
23 23
 
24 24
 [my_tv]
25 25
 ..return|back|default|Atgriezties atpakaļ
@@ -58,14 +58,6 @@ Latest programs|euronews::content/getLatestPrograms?lang=en&byPage=40&page=1|htt
58 58
 ..return|back||Atgriezties atpakaļ
59 59
 Все фильмы|filmix::films|http://cs5324.vk.me/g33668783/a_903fcc63.jpg|Все фильмы
60 60
 Все сериалы|filmix::serialy|http://cs5324.vk.me/g33668783/a_903fcc63.jpg|Все сериалы
61
-SerialGURU.ru last video|serialguru::last|http://serialguru.ru/images/xlogo_new.png.pagespeed.ic.0sre2_2OJN.png|SerialGURU.ru last video
62
-Теория большого взрыва (США,  2007)|serialguru::serial-teoriya-bolshogo-vzryva|http://serialguru.ru/uploads/serial/xteoriyabolshogovzruva_l.jpg.pagespeed.ic.0kEk2QKIeK.jpg|Теория большого взрыва (США,  2007)
63
-Побег|filmix::play/10331|http://filmix.net/uploads/posters/thumbs/w220/smotret-onlayn-pobeg-2010_10331_0.jpg|
64
-Побег/Prison Break|filmix::play/6200|http://filmix.net/uploads/posters/thumbs/w220/smotret-serial-pobeg-vse-sezony-1234-sezon-2005_6200_0.jpg|
65
-Бриджит Джонс 3/Bridget Jones's Baby (2016)|filmix::play/107139|http://filmix.net/uploads/posters/thumbs/w220/bridzhit-dzhons-3_107139_0.jpg|
66
-Теория большого взрыва / The Big Bang Theory (2007) -  Сезон 10|filmix::play/6697?s=10|http://filmix.net/uploads/posters/thumbs/w220/smotret-onlajn-teoriya-bolshogo-vzryva-2009_6697_0.jpg|Персонажей сериала \"Теория большого взрыва\" онлайн связывает своеобразный любовный треугольник. Главный герой этой истории является прирожденным гением. Он не желает жить без науки. А вот героиней сериала стала типичная блондинка, которая не особо вникает в научные проблемы. Несложно было догадаться, что молодой паренек влюбится в такую белокурую красавицу. Иначе быть и не могло. Один из гениев науки с первого взгляда влюбляется в девушку. Он уже даже продумал план их совместной жизни. Юноша мечтает о семье, в которой обязательно будет присутствовать эта сногсшибательная блондинка. Но есть одно «но».
67
-Теория большого взрыва / The Big Bang Theory - Сезон 10|serialguru::serial-teoriya-bolshogo-vzryva/9||Теория большого взрыва / The Big Bang Theory
68
-Великолепный век/Muhtesem Y&#252;zyil (2011)|filmix::play/84389|http://filmix.net/uploads/posters/thumbs/w220/serial-velikolepnyy-vek-smotret-2011-2015_84389_0.jpg|
69 61
 
70 62
 [my_kids]
71 63
 ..return|back|default|Atgriezties atpakaļ
@@ -95,13 +87,6 @@ Om Nom (FilmOn)|filmon::channel?id=3824|http://static.filmon.com/assets/channels
95 87
 
96 88
 [my_kids_video]
97 89
 ..return|back|default|Atgriezties atpakaļ
98
-(HD) Brave|ltc::videonoma/animation/hd_brave|https://www.lattelecom.tv/media/movies/9201/8b27de45.jpg|(HD) Brave
99
-(HD) Cars 2|ltc::videonoma/animation/hd_cars_2|https://www.lattelecom.tv/media/movies/9203/2c1ada91.jpg|(HD) Cars 2
100
-Bēthovens (1992)/Beethoven [LV]|cinemalive::movie/bethovens-1992|https://cinemalive.tv/content/movies//bethovens-1992/sm.jpg|Filmas galvenais varonis nav vis dižais komponists, bet gan nejauši viņa vārdā nosaukts piemīlīgs sanbernārs. Mazais kucēns ātri iejūtas savā jaunajā ģimenē, un drīz vien izaug par iespaidīgu suni. Neska ...
101
-Bēthovens 2 (1993)/Beethoven&#x27;s 2nd [LV]|cinemalive::movie/bethovens-2-1993|https://cinemalive.tv/content/movies//bethovens-2-1993/sm.jpg|Visu iemilotasi sanbernars Bethovens beidzot ir atradis savu milestibu - Misiju. Bet vina ipasnieks Dzordzs Nutons sak saprast, ko pa istam nozime haoss - cetru kucenu izskata. Pavisam nopietnas problemas sakas, kad laun ...
102
-Bēthovens 3 (2000)/Beethoven&#x27;s 3rd [LV]|cinemalive::movie/bethovens-3-2000|https://cinemalive.tv/content/movies//bethovens-3-2000/sm.jpg|Ņūtonu ģimene ir devusies atvaļinājumā uz Eiropu. Tikmēr Bēthovens kopā ar aizceļojušā saimnieka brāli Ričardu un viņa ģimenīti brauc uz Ņūtonu klana salidojumu Kalifornijā. Brauciens, protams, būtu ...
103
-Bēthovens 4 (2001)/Beethoven&#x27;s 4th [LV]|cinemalive::movie/bethovens-4-2001|https://cinemalive.tv/content/movies//bethovens-4-2001/sm.jpg|Visapburošākais suns pasaulē dosies savā ilgākajā ceļojumā! Pasaulē iemīļotākais sanbernārs, bērnu elks un vienkārši lieliskais Bēthovens atgriežas, lai no jauna liktu Jums smieties līdz pat sāpēm v� ...
104
-Bēthovens 5 (2003)/Beethoven&#x27;s 5th [LV]|cinemalive::movie/bethovens-5-2003|https://cinemalive.tv/content/movies//bethovens-5-2003/sm.jpg|Bēthovena saimniece Sāra pēdējā laikā nav bijusi sevišķi paklausīga, tāpēc vasaras brīvdienas viņai jāpavada pie tēvoča Kviksilverā. Kopā ar Sāru Bēthovens kāpj autobusā un dodas uz bijušo ogļrač ...
105 90
 
106 91
 [my_radio]
107 92
 ..return|back|default|Atgriezties atpakaļ

+ 0
- 0
sources/streams0.cfg.rsls Ver fichero


BIN
sources/swfinterp.pyc Ver fichero


+ 2
- 2
sources/tvdom.cfg Ver fichero

@@ -1,4 +1,4 @@
1 1
 [tvdom]
2
-user = ivars777@gmail.com
3
-password = kaskade7
2
+user = lietotajs
3
+password = parole
4 4
 

BIN
sources/tvdom.pyc Ver fichero


+ 2
- 2
sources/ustvnow.cfg Ver fichero

@@ -1,4 +1,4 @@
1 1
 [ustvnow]
2
-user = ivars777@gmail.com
3
-password = kaskade7
2
+user = lietotajs
3
+password = parole
4 4
 

+ 0
- 3
sources/ustvnow.cfg0 Ver fichero

@@ -1,3 +0,0 @@
1
-[ustvnow]
2
-user=ivars777%40gmail.com
3
-password=kaskade7

BIN
sources/ustvnow.pyc Ver fichero


+ 3
- 3
sources/viaplay.cfg Ver fichero

@@ -1,5 +1,5 @@
1 1
 [viaplay]
2
-user = ivars777@gmail.com
3
-password = kaskade7
4
-device = 920edcd145361a44e3ed1a68a1e25ed8584bad40-499b21d2-e6ec-4973-b57c-6db7cf43bdd0=4bee35a3-6399-434d-93f2-87de8cf7436c
2
+user = change_user
3
+password = change_password
4
+device = 
5 5
 

BIN
sources/viaplay.pyc Ver fichero