Ivars 6 years ago
parent
commit
586c95d2b7
9 changed files with 130 additions and 153 deletions
  1. BIN
      picons/next.png
  2. 119
    145
      project.wpr
  3. 4
    1
      resolvers/cloudsany.py
  4. 1
    1
      sources/cinemalive.py
  5. 1
    1
      sources/euronews.py
  6. 1
    1
      sources/filmix.py
  7. 1
    1
      sources/iplayer.py
  8. 1
    1
      sources/lmt.py
  9. 2
    2
      sources/movieplace.py

BIN
picons/next.png View File


+ 119
- 145
project.wpr View File

@@ -78,11 +78,7 @@ debug.breakpoints = {loc('Downloader.py'): {182L: (0,
78 78
         None,
79 79
         1,
80 80
         0),
81
-        53L: (0,
82
-              None,
83
-              1,
84
-              0),
85
-        86L: (0,
81
+        56L: (0,
86 82
               None,
87 83
               1,
88 84
               0),
@@ -90,7 +86,7 @@ debug.breakpoints = {loc('Downloader.py'): {182L: (0,
90 86
               None,
91 87
               1,
92 88
               0),
93
-        117L: (0,
89
+        120L: (0,
94 90
                None,
95 91
                1,
96 92
                0)},
@@ -788,18 +784,18 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
788 784
         'top-node': [('generic attribute',
789 785
                       loc('../../../../../Python27/lib/site-packages/PIL/Image.py'),
790 786
                       'ADAPTIVE')]},
791
-        loc('unknown:<untitled> #6'): {'expanded-nodes': [],
787
+        loc('unknown:<untitled> #5'): {'column-widths': [1.0],
788
+                                       'expanded-nodes': [],
792 789
                                        'selected-nodes': [],
793 790
                                        'top-node': None},
794
-        loc('unknown:<untitled> #4'): {'column-widths': [1.0],
795
-                                       'expanded-nodes': [],
791
+        loc('unknown:<untitled> #6'): {'expanded-nodes': [],
796 792
                                        'selected-nodes': [],
797 793
                                        'top-node': None},
798
-        loc('unknown:<untitled> #3'): {'column-widths': [1.0],
794
+        loc('unknown:<untitled> #4'): {'column-widths': [1.0],
799 795
                                        'expanded-nodes': [],
800 796
                                        'selected-nodes': [],
801 797
                                        'top-node': None},
802
-        loc('unknown:<untitled> #5'): {'expanded-nodes': [],
798
+        loc('unknown:<untitled> #3'): {'expanded-nodes': [],
803 799
                                        'selected-nodes': [],
804 800
                                        'top-node': None}},
805 801
                                 'browse_mode': u'Current Module',
@@ -936,37 +932,14 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
936 932
         -1,
937 933
         -1),
938 934
                        'attrib-starts': [],
939
-                       'first-line': 219L,
935
+                       'first-line': 0L,
940 936
                        'folded-linenos': [],
941
-                       'history': {u'file:C:/Data/Programming/enigma2/PlayStream2/content/run.py': ['p'\
942
-        'rint url\n',
943
-        'url\n',
944
-        'params\n'],
945
-                                   u'file:C:/Data/Programming/enigma2/PlayStream2/content/sources/cinemalive.py': ['p'\
946
-        'rint p0\n',
947
-        'p\n',
948
-        'm2\n',
949
-        'dict(m2.groups())\n',
950
-        'm2.groups().dict()\n',
951
-        'm2.groups()\n',
952
-        'list(m2.groups())\n',
953
-        'l = list(m2.groups())\n',
954
-        'l.remove(2)\n',
955
-        'l.remove("video")\n',
956
-        'l\n'],
957
-                                   u'file:C:/Data/Programming/enigma2/PlayStream2/content/sources/euronews.py': ['d'\
958
-        'ata\n',
959
-        'content\n',
960
-        'url\n',
961
-        'print url\n',
962
-        'r\n',
963
-        'article["text"]\n',
964
-        'cmd\n']},
937
+                       'history': {},
965 938
                        'launch-id': None,
966
-                       'sel-line': 231L,
967
-                       'sel-line-start': 16224L,
968
-                       'selection_end': 16245L,
969
-                       'selection_start': 16224L,
939
+                       'sel-line': 0L,
940
+                       'sel-line-start': 0L,
941
+                       'selection_end': 0L,
942
+                       'selection_start': 0L,
970 943
                        'zoom': 0L}),
971 944
                      ('debug-watch',
972 945
                       'wide',
@@ -1012,86 +985,17 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1012 985
                        'selection_end': 174L,
1013 986
                        'selection_start': 174L,
1014 987
                        'zoom': 0L})],
1015
-        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('sources/cinemalive.py'),
1016
-        {'attrib-starts': [('Source',
1017
-                            29),
1018
-                           ('Source.get_streams',
1019
-                            166)],
1020
-         'first-line': 176L,
988
+        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('resolvers/cloudsany.py'),
989
+        {'attrib-starts': [('resolve',
990
+                            30)],
991
+         'first-line': 77L,
1021 992
          'folded-linenos': [],
1022
-         'sel-line': 184L,
1023
-         'sel-line-start': 9045L,
1024
-         'selection_end': 9087L,
1025
-         'selection_start': 9074L,
993
+         'sel-line': 85L,
994
+         'sel-line-start': 2581L,
995
+         'selection_end': 2619L,
996
+         'selection_start': 2606L,
1026 997
          'zoom': 0L},
1027
-        1513038881.367],
1028
-        [loc('resolver.py'),
1029
-         {'attrib-starts': [],
1030
-          'first-line': 0L,
1031
-          'folded-linenos': [],
1032
-          'sel-line': 0L,
1033
-          'sel-line-start': 0L,
1034
-          'selection_end': 0L,
1035
-          'selection_start': 0L,
1036
-          'zoom': 0L},
1037
-         1513038900.236],
1038
-        [loc('resolvers/cloudsany.py'),
1039
-         {'attrib-starts': [('resolve',
1040
-                             30)],
1041
-          'first-line': 56L,
1042
-          'folded-linenos': [],
1043
-          'sel-line': 66L,
1044
-          'sel-line-start': 1937L,
1045
-          'selection_end': 1972L,
1046
-          'selection_start': 1972L,
1047
-          'zoom': 0L},
1048
-         1513038911.299],
1049
-        [loc('resolvers/cloudsany.py'),
1050
-         {'attrib-starts': [('resolve',
1051
-                             30)],
1052
-          'first-line': 77L,
1053
-          'folded-linenos': [],
1054
-          'sel-line': 84L,
1055
-          'sel-line-start': 2550L,
1056
-          'selection_end': 2580L,
1057
-          'selection_start': 2580L,
1058
-          'zoom': 0L},
1059
-         1513038986.051],
1060
-        [loc('sources/cinemalive.py'),
1061
-         {'attrib-starts': [('Source',
1062
-                             29),
1063
-                            ('Source.get_streams',
1064
-                             166)],
1065
-          'first-line': 176L,
1066
-          'folded-linenos': [],
1067
-          'sel-line': 184L,
1068
-          'sel-line-start': 9045L,
1069
-          'selection_end': 9087L,
1070
-          'selection_start': 9074L,
1071
-          'zoom': 0L},
1072
-         1513039022.989],
1073
-        [loc('resolvers/cloudsany.py'),
1074
-         {'attrib-starts': [('resolve',
1075
-                             30)],
1076
-          'first-line': 77L,
1077
-          'folded-linenos': [],
1078
-          'sel-line': 84L,
1079
-          'sel-line-start': 2550L,
1080
-          'selection_end': 2580L,
1081
-          'selection_start': 2580L,
1082
-          'zoom': 0L},
1083
-         1513039024.31],
1084
-        [loc('resolvers/cloudsany.py'),
1085
-         {'attrib-starts': [('resolve',
1086
-                             30)],
1087
-          'first-line': 77L,
1088
-          'folded-linenos': [],
1089
-          'sel-line': 85L,
1090
-          'sel-line-start': 2581L,
1091
-          'selection_end': 2619L,
1092
-          'selection_start': 2606L,
1093
-          'zoom': 0L},
1094
-         1513039024.825],
998
+        1513039024.825],
1095 999
         [loc('resolvers/cloudsany.py'),
1096 1000
          {'attrib-starts': [('resolve',
1097 1001
                              30)],
@@ -1240,9 +1144,82 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1240 1144
           'selection_end': 2834L,
1241 1145
           'selection_start': 2834L,
1242 1146
           'zoom': 0L},
1243
-         1513039884.569]],
1147
+         1513039884.569],
1148
+        [loc('sources/cinemalive.py'),
1149
+         {'attrib-starts': [('Source',
1150
+                             29),
1151
+                            ('Source.get_streams',
1152
+                             166)],
1153
+          'first-line': 176L,
1154
+          'folded-linenos': [],
1155
+          'sel-line': 184L,
1156
+          'sel-line-start': 9045L,
1157
+          'selection_end': 9087L,
1158
+          'selection_start': 9074L,
1159
+          'zoom': 0L},
1160
+         1513039905.096],
1161
+        [loc('resolvers/cloudsany.py'),
1162
+         {'attrib-starts': [('resolve',
1163
+                             30)],
1164
+          'first-line': 81L,
1165
+          'folded-linenos': [],
1166
+          'sel-line': 87L,
1167
+          'sel-line-start': 2699L,
1168
+          'selection_end': 2719L,
1169
+          'selection_start': 2719L,
1170
+          'zoom': 0L},
1171
+         1513041023.607],
1172
+        [loc('sources/euronews.py'),
1173
+         {'attrib-starts': [('Source',
1174
+                             26),
1175
+                            ('Source.get_streams',
1176
+                             150)],
1177
+          'first-line': 168L,
1178
+          'folded-linenos': [],
1179
+          'sel-line': 176L,
1180
+          'sel-line-start': 7974L,
1181
+          'selection_end': 7974L,
1182
+          'selection_start': 7974L,
1183
+          'zoom': 0L},
1184
+         1513041028.021],
1185
+        [loc('sources/euronews.py'),
1186
+         {'attrib-starts': [],
1187
+          'first-line': 302L,
1188
+          'folded-linenos': [],
1189
+          'sel-line': 309L,
1190
+          'sel-line-start': 12837L,
1191
+          'selection_end': 12837L,
1192
+          'selection_start': 12837L,
1193
+          'zoom': 0L},
1194
+         1516202716.441],
1195
+        [loc('ContentSources.py'),
1196
+         {'attrib-starts': [('ContentSources',
1197
+                             16),
1198
+                            ('ContentSources.get_content',
1199
+                             64)],
1200
+          'first-line': 80L,
1201
+          'folded-linenos': [],
1202
+          'sel-line': 89L,
1203
+          'sel-line-start': 4016L,
1204
+          'selection_end': 4016L,
1205
+          'selection_start': 4016L,
1206
+          'zoom': 0L},
1207
+         1516202720.157],
1208
+        [loc('run.py'),
1209
+         {'attrib-starts': [('Main',
1210
+                             22),
1211
+                            ('Main.play_video',
1212
+                             242)],
1213
+          'first-line': 255L,
1214
+          'folded-linenos': [],
1215
+          'sel-line': 264L,
1216
+          'sel-line-start': 10415L,
1217
+          'selection_end': 10415L,
1218
+          'selection_start': 10415L,
1219
+          'zoom': 0L},
1220
+         1516203350.279]],
1244 1221
         20),
1245
-        'current-loc': loc('sources/cinemalive.py'),
1222
+        'current-loc': loc('resolvers/cloudsany.py'),
1246 1223
         'editor-state-list': [(loc('ContentSources.py'),
1247 1224
                                {'attrib-starts': [('ContentSources',
1248 1225
         16),
@@ -1366,16 +1343,13 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1366 1343
                                 'selection_start': 10415L,
1367 1344
                                 'zoom': 0L}),
1368 1345
                               (loc('sources/euronews.py'),
1369
-                               {'attrib-starts': [('Source',
1370
-        26),
1371
-        ('Source.get_streams',
1372
-         150)],
1373
-                                'first-line': 168L,
1346
+                               {'attrib-starts': [],
1347
+                                'first-line': 302L,
1374 1348
                                 'folded-linenos': [],
1375
-                                'sel-line': 176L,
1376
-                                'sel-line-start': 7974L,
1377
-                                'selection_end': 7974L,
1378
-                                'selection_start': 7974L,
1349
+                                'sel-line': 309L,
1350
+                                'sel-line-start': 12837L,
1351
+                                'selection_end': 12837L,
1352
+                                'selection_start': 12837L,
1379 1353
                                 'zoom': 0L}),
1380 1354
                               (loc('sources/filmon.py'),
1381 1355
                                {'attrib-starts': [('Source',
@@ -1401,12 +1375,12 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1401 1375
                               (loc('resolvers/cloudsany.py'),
1402 1376
                                {'attrib-starts': [('resolve',
1403 1377
         30)],
1404
-                                'first-line': 81L,
1378
+                                'first-line': 41L,
1405 1379
                                 'folded-linenos': [],
1406
-                                'sel-line': 90L,
1407
-                                'sel-line-start': 2808L,
1408
-                                'selection_end': 2834L,
1409
-                                'selection_start': 2834L,
1380
+                                'sel-line': 55L,
1381
+                                'sel-line-start': 1587L,
1382
+                                'selection_end': 1599L,
1383
+                                'selection_start': 1599L,
1410 1384
                                 'zoom': 0L})],
1411 1385
         'has-focus': True,
1412 1386
         'locked': False},
@@ -1425,21 +1399,21 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1425 1399
          loc('sources/filmon.py'),
1426 1400
          loc('resolver.py'),
1427 1401
          loc('resolvers/cloudsany.py')]),
1428
-                               'open_files': [u'kivy_test.py',
1402
+                               'open_files': [u'Downloader.py',
1403
+        u'kivy_test.py',
1404
+        u'resolver.py',
1405
+        u'sources/cinemalive.py',
1429 1406
         u'sources/filmas.py',
1430 1407
         u'sources/filmix.py',
1408
+        u'sources/filmon.py',
1431 1409
         u'sources/lmt.py',
1432 1410
         u'sources/ltc.py',
1433 1411
         u'sources/replay.py',
1434 1412
         u'util.py',
1435
-        u'Downloader.py',
1436 1413
         u'sources/euronews.py',
1437 1414
         u'ContentSources.py',
1438
-        u'sources/filmon.py',
1439 1415
         u'run.py',
1440
-        u'resolver.py',
1441
-        u'resolvers/cloudsany.py',
1442
-        u'sources/cinemalive.py']},
1416
+        u'resolvers/cloudsany.py']},
1443 1417
         'saved_notebook_display': None,
1444 1418
         'split_percents': {0: 0.42670046472327844},
1445 1419
         'splits': 2,
@@ -1454,15 +1428,15 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1454 1428
                          -1080,
1455 1429
                          1858,
1456 1430
                          1080)}]}
1457
-guimgr.recent-documents = [loc('sources/cinemalive.py'),
1458
-                           loc('resolvers/cloudsany.py'),
1459
-                           loc('resolver.py'),
1431
+guimgr.recent-documents = [loc('resolvers/cloudsany.py'),
1460 1432
                            loc('run.py'),
1461
-                           loc('sources/filmon.py'),
1462 1433
                            loc('ContentSources.py'),
1463 1434
                            loc('sources/euronews.py'),
1464
-                           loc('Downloader.py'),
1465 1435
                            loc('util.py'),
1436
+                           loc('sources/cinemalive.py'),
1437
+                           loc('resolver.py'),
1438
+                           loc('sources/filmon.py'),
1439
+                           loc('Downloader.py'),
1466 1440
                            loc('sources/filmas.py'),
1467 1441
                            loc('kivy_test.py'),
1468 1442
                            loc('sources/ltc.py'),

+ 4
- 1
resolvers/cloudsany.py View File

@@ -50,7 +50,10 @@ def resolve(url):
50 50
     m = re.search(r"'(https\|.+?jwplayer)'", r)
51 51
     if not m:
52 52
         print url
53
-        raise Exception("Can not find stream")
53
+        if "File was deleted" in r:
54
+            raise Exception("File was deleted")
55
+        else:
56
+            raise Exception("Can not find stream")
54 57
 
55 58
     p = m.group(1).split("|")
56 59
     p0 = m.group(1)

+ 1
- 1
sources/cinemalive.py View File

@@ -151,7 +151,7 @@ Accept-Language: en-US,en;q=0.8
151 151
             m = re.search(r"""<span class="current">\d+</span><a href='https://cinemalive.tv/([^']+)'""", r0)
152 152
             if m:
153 153
                 data2 = m.group(1)
154
-                content.append(("Next page",self.name+"::"+data2,self.img,"Next page"))
154
+                content.append(("Next page",self.name+"::"+data2,"next.png","Next page"))
155 155
             return content
156 156
 
157 157
         else:

+ 1
- 1
sources/euronews.py View File

@@ -135,7 +135,7 @@ Connection: keep-alive
135 135
                     content.append((title,self.name+"::"+data2,img,desc))
136 136
             if "page=" in data:
137 137
                 data2 = re.sub("page=\d+","page=%s"%(int(qs["page"])+1),data)
138
-                content.append(("Next page",self.name+"::"+data2,self.img,"Next page"))
138
+                content.append(("Next page",self.name+"::"+data2,"next.png","Next page"))
139 139
             return content
140 140
 
141 141
 

+ 1
- 1
sources/filmix.py View File

@@ -185,7 +185,7 @@ Cookie: FILMIXNET=%s
185 185
                         data2 = re.sub("/page/(\d)+", "/page/%s"%page, data)
186 186
                     else:
187 187
                         data2 = data + "/page/2"
188
-                content.append(("Next page",self.name+"::"+data2,self.img,"Next page"))
188
+                content.append(("Next page",self.name+"::"+data2,"next.png","Next page"))
189 189
 
190 190
             return content
191 191
 

+ 1
- 1
sources/iplayer.py View File

@@ -173,7 +173,7 @@ Connection: Keep-Alive
173 173
 
174 174
             if "&page=" in data and lst["page"]*lst["per_page"]<lst["count"]:
175 175
                 data2 = re.sub("&page=\d+","&page=%s"%(lst["page"]+1),data)
176
-                content.append(("Next page",self.name+"::"+data2,self.img,"Next page"))
176
+                content.append(("Next page",self.name+"::"+data2,"next.png","Next page"))
177 177
             return content
178 178
 
179 179
         ### A-z root ###

+ 1
- 1
sources/lmt.py View File

@@ -110,7 +110,7 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
110 110
             if m:
111 111
                 page = int(m.group(1))+1
112 112
                 data2 = re.sub(r"videoPage=\d+", r"videoPage=%s"%page, data)
113
-                content.append(("Next page",self.name+"::"+data2,self.img,"Next page"))
113
+                content.append(("Next page",self.name+"::"+data2,"next.png","Next page"))
114 114
             #print content
115 115
             return content
116 116
 

+ 2
- 2
sources/movieplace.py View File

@@ -93,7 +93,7 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
93 93
                 if m:
94 94
                     page = int(m.group(1))+1
95 95
                     data2 = re.sub(r"p=\d+", r"p=%s"%page, data)
96
-                    content.append(("Next page",self.name+"::"+data2,self.img,"Next page"))
96
+                    content.append(("Next page",self.name+"::"+data2,"next.png","Next page"))
97 97
             return content
98 98
 
99 99
         # Filmu saraksti ##
@@ -119,7 +119,7 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
119 119
                     page = int(re.search("\d+$",data).group())
120 120
                     page = page+1
121 121
                     data2 = re.sub("\d$","%s"%page,data)
122
-                    content.append(("Next page",self.name+"::"+data2,self.img,"Next page"))
122
+                    content.append(("Next page",self.name+"::"+data2,"next.png","Next page"))
123 123
             return content
124 124
 
125 125
         ### Seriāls ###