Browse Source

filmas salabotas

Ivars 6 years ago
parent
commit
c5adf8d9d9
2 changed files with 179 additions and 205 deletions
  1. 152
    181
      project.wpr
  2. 27
    24
      sources/filmas.py

+ 152
- 181
project.wpr View File

134
                      loc('sources/euronews.py'): {161L: (0,
134
                      loc('sources/euronews.py'): {161L: (0,
135
         None,
135
         None,
136
         1,
136
         1,
137
+        0)},
138
+                     loc('sources/filmas.py'): {110L: (0,
139
+        None,
140
+        1,
137
         0)},
141
         0)},
138
                      loc('sources/filmix.py'): {77L: (0,
142
                      loc('sources/filmix.py'): {77L: (0,
139
         None,
143
         None,
155
         None,
159
         None,
156
         1,
160
         1,
157
         0),
161
         0),
158
-        208L: (0,
159
-               None,
160
-               1,
161
-               0),
162
+        210: (0,
163
+              None,
164
+              1,
165
+              0),
162
         231L: (0,
166
         231L: (0,
163
                None,
167
                None,
164
                1,
168
                1,
830
         'top-node': [('generic attribute',
834
         'top-node': [('generic attribute',
831
                       loc('../../../../../Python27/lib/site-packages/PIL/Image.py'),
835
                       loc('../../../../../Python27/lib/site-packages/PIL/Image.py'),
832
                       'ADAPTIVE')]},
836
                       'ADAPTIVE')]},
833
-        loc('unknown:<untitled> #5'): {'expanded-nodes': [],
837
+        loc('unknown:<untitled> #3'): {'expanded-nodes': [],
834
                                        'selected-nodes': [],
838
                                        'selected-nodes': [],
835
                                        'top-node': None},
839
                                        'top-node': None},
836
-        loc('unknown:<untitled> #4'): {'column-widths': [1.0],
837
-                                       'expanded-nodes': [],
840
+        loc('unknown:<untitled> #5'): {'expanded-nodes': [],
838
                                        'selected-nodes': [],
841
                                        'selected-nodes': [],
839
                                        'top-node': None},
842
                                        'top-node': None},
840
-        loc('unknown:<untitled> #6'): {'expanded-nodes': [],
843
+        loc('unknown:<untitled> #6'): {'column-widths': [1.0],
844
+                                       'expanded-nodes': [],
841
                                        'selected-nodes': [],
845
                                        'selected-nodes': [],
842
                                        'top-node': None},
846
                                        'top-node': None},
843
-        loc('unknown:<untitled> #3'): {'column-widths': [1.0],
847
+        loc('unknown:<untitled> #4'): {'column-widths': [1.0],
844
                                        'expanded-nodes': [],
848
                                        'expanded-nodes': [],
845
                                        'selected-nodes': [],
849
                                        'selected-nodes': [],
846
                                        'top-node': None}},
850
                                        'top-node': None}},
978
         -1,
982
         -1,
979
         -1),
983
         -1),
980
                        'attrib-starts': [],
984
                        'attrib-starts': [],
981
-                       'first-line': 168L,
985
+                       'first-line': 0L,
982
                        'folded-linenos': [],
986
                        'folded-linenos': [],
983
-                       'history': {u'file:C:/Data/Programming/Kodi/plugin.video.playstream/resources/lib/content/sources/replay.py': ['j'\
984
-        's["player"]["clip"]["sources"][0]["src"]\n',
985
-        'data\n',
986
-        'print data\n',
987
-        'm.group(1)\n',
988
-        'headers\n',
989
-        'print r3\n',
990
-        'url3\n',
991
-        'print url3\n',
992
-        '"m3u8" in r3\n',
993
-        'print data2\n',
994
-        'print r\n']},
987
+                       'history': {},
995
                        'launch-id': None,
988
                        'launch-id': None,
996
-                       'sel-line': 181L,
997
-                       'sel-line-start': 7571L,
998
-                       'selection_end': 7571L,
999
-                       'selection_start': 7571L,
989
+                       'sel-line': 0L,
990
+                       'sel-line-start': 0L,
991
+                       'selection_end': 0L,
992
+                       'selection_start': 0L,
1000
                        'zoom': 0L}),
993
                        'zoom': 0L}),
1001
                      ('debug-watch',
994
                      ('debug-watch',
1002
                       'wide',
995
                       'wide',
1044
                        'selection_end': 174L,
1037
                        'selection_end': 174L,
1045
                        'selection_start': 174L,
1038
                        'selection_start': 174L,
1046
                        'zoom': 0L})],
1039
                        'zoom': 0L})],
1047
-        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('sources/replay.py'),
1048
-        {'attrib-starts': [('Source',
1049
-                            31),
1050
-                           ('Source.get_content',
1051
-                            42)],
1052
-         'first-line': 115L,
1053
-         'folded-linenos': [49L,
1054
-                            70L,
1055
-                            89L,
1056
-                            102L,
1057
-                            132L,
1058
-                            155L,
1059
-                            212L,
1060
-                            228L,
1061
-                            254L,
1062
-                            282L],
1063
-         'sel-line': 126L,
1064
-         'sel-line-start': 5965L,
1065
-         'selection_end': 6001L,
1066
-         'selection_start': 6001L,
1040
+        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('run.py'),
1041
+        {'attrib-starts': [('Main',
1042
+                            22),
1043
+                           ('Main.play_video',
1044
+                            242)],
1045
+         'first-line': 243L,
1046
+         'folded-linenos': [],
1047
+         'sel-line': 254L,
1048
+         'sel-line-start': 9998L,
1049
+         'selection_end': 9998L,
1050
+         'selection_start': 9998L,
1067
          'zoom': 0L},
1051
          'zoom': 0L},
1068
-        1529011316.587],
1069
-        [loc('sources/replay.py'),
1070
-         {'attrib-starts': [('Source',
1071
-                             31),
1072
-                            ('Source.get_streams',
1073
-                             206)],
1074
-          'first-line': 251L,
1075
-          'folded-linenos': [49L,
1076
-                             70L,
1077
-                             89L,
1078
-                             102L,
1079
-                             132L,
1080
-                             155L,
1081
-                             254L,
1082
-                             268L,
1083
-                             279L],
1084
-          'sel-line': 310L,
1085
-          'sel-line-start': 15523L,
1086
-          'selection_end': 15523L,
1087
-          'selection_start': 15523L,
1088
-          'zoom': 0L},
1089
-         1529012433.669],
1090
-        [loc('run.py'),
1091
-         {'attrib-starts': [('Main',
1092
-                             22),
1093
-                            ('Main.play_video',
1094
-                             242)],
1095
-          'first-line': 222L,
1096
-          'folded-linenos': [],
1097
-          'sel-line': 254L,
1098
-          'sel-line-start': 9998L,
1099
-          'selection_end': 9998L,
1100
-          'selection_start': 9998L,
1101
-          'zoom': 0L},
1102
-         1529012441.761],
1103
-        [loc('sources/replay.py'),
1104
-         {'attrib-starts': [('Source',
1105
-                             31),
1106
-                            ('Source.get_streams',
1107
-                             206)],
1108
-          'first-line': 218L,
1109
-          'folded-linenos': [49L,
1110
-                             70L,
1111
-                             89L,
1112
-                             102L,
1113
-                             132L,
1114
-                             155L,
1115
-                             254L],
1116
-          'sel-line': 315L,
1117
-          'sel-line-start': 15677L,
1118
-          'selection_end': 15677L,
1119
-          'selection_start': 15677L,
1120
-          'zoom': 0L},
1121
-         1529012607.591],
1122
-        [loc('sources/replay.py'),
1123
-         {'attrib-starts': [('Source',
1124
-                             31),
1125
-                            ('Source.get_streams',
1126
-                             206)],
1127
-          'first-line': 223L,
1128
-          'folded-linenos': [49L,
1129
-                             70L,
1130
-                             89L,
1131
-                             102L,
1132
-                             132L,
1133
-                             155L,
1134
-                             228L],
1135
-          'sel-line': 258L,
1136
-          'sel-line-start': 13160L,
1137
-          'selection_end': 13160L,
1138
-          'selection_start': 13160L,
1139
-          'zoom': 0L},
1140
-         1529012826.297],
1141
-        [loc('run.py'),
1142
-         {'attrib-starts': [('Main',
1143
-                             22),
1144
-                            ('Main.play_video',
1145
-                             242)],
1146
-          'first-line': 243L,
1147
-          'folded-linenos': [],
1148
-          'sel-line': 254L,
1149
-          'sel-line-start': 9998L,
1150
-          'selection_end': 9998L,
1151
-          'selection_start': 9998L,
1152
-          'zoom': 0L},
1153
-         1529012838.028],
1154
-        [loc('sources/replay.py'),
1155
-         {'attrib-starts': [('Source',
1156
-                             31),
1157
-                            ('Source.get_streams',
1158
-                             206)],
1159
-          'first-line': 223L,
1160
-          'folded-linenos': [49L,
1161
-                             70L,
1162
-                             89L,
1163
-                             102L,
1164
-                             132L,
1165
-                             155L,
1166
-                             228L],
1167
-          'sel-line': 256L,
1168
-          'sel-line-start': 13027L,
1169
-          'selection_end': 13028L,
1170
-          'selection_start': 13028L,
1171
-          'zoom': 0L},
1172
-         1529260759.969],
1173
-        [loc('run.py'),
1174
-         {'attrib-starts': [('Main',
1175
-                             22),
1176
-                            ('Main.play_video',
1177
-                             242)],
1178
-          'first-line': 243L,
1179
-          'folded-linenos': [],
1180
-          'sel-line': 254L,
1181
-          'sel-line-start': 9998L,
1182
-          'selection_end': 9998L,
1183
-          'selection_start': 9998L,
1184
-          'zoom': 0L},
1185
-         1529260772.909],
1052
+        1529260772.909],
1186
         [loc('ContentSources.py'),
1053
         [loc('ContentSources.py'),
1187
          {'attrib-starts': [('ContentSources',
1054
          {'attrib-starts': [('ContentSources',
1188
                              16),
1055
                              16),
1380
           'selection_end': 11592L,
1247
           'selection_end': 11592L,
1381
           'selection_start': 11592L,
1248
           'selection_start': 11592L,
1382
           'zoom': 0L},
1249
           'zoom': 0L},
1383
-         1529784296.575]],
1250
+         1529784296.575],
1251
+        [loc('sources/replay.py'),
1252
+         {'attrib-starts': [('Source',
1253
+                             31),
1254
+                            ('Source.get_streams',
1255
+                             209)],
1256
+          'first-line': 250L,
1257
+          'folded-linenos': [49L,
1258
+                             70L,
1259
+                             89L,
1260
+                             102L,
1261
+                             132L,
1262
+                             155L],
1263
+          'sel-line': 260L,
1264
+          'sel-line-start': 13355L,
1265
+          'selection_end': 13355L,
1266
+          'selection_start': 13355L,
1267
+          'zoom': 0L},
1268
+         1529839917.518],
1269
+        [loc('sources/filmas.py'),
1270
+         {'attrib-starts': [('Source',
1271
+                             36),
1272
+                            ('Source.get_content',
1273
+                             59)],
1274
+          'first-line': 211L,
1275
+          'folded-linenos': [],
1276
+          'sel-line': 72L,
1277
+          'sel-line-start': 2912L,
1278
+          'selection_end': 3002L,
1279
+          'selection_start': 3002L,
1280
+          'zoom': 0L},
1281
+         1529840048.66],
1282
+        [loc('sources/replay.py'),
1283
+         {'attrib-starts': [],
1284
+          'first-line': 384L,
1285
+          'folded-linenos': [49L,
1286
+                             70L,
1287
+                             89L,
1288
+                             102L,
1289
+                             132L,
1290
+                             155L],
1291
+          'sel-line': 388L,
1292
+          'sel-line-start': 19109L,
1293
+          'selection_end': 19327L,
1294
+          'selection_start': 19109L,
1295
+          'zoom': 0L},
1296
+         1529840061.689],
1297
+        [loc('sources/filmas.py'),
1298
+         {'attrib-starts': [],
1299
+          'first-line': 224L,
1300
+          'folded-linenos': [],
1301
+          'sel-line': 220L,
1302
+          'sel-line-start': 9464L,
1303
+          'selection_end': 9482L,
1304
+          'selection_start': 9482L,
1305
+          'zoom': 0L},
1306
+         1529840151.336],
1307
+        [loc('sources/replay.py'),
1308
+         {'attrib-starts': [],
1309
+          'first-line': 384L,
1310
+          'folded-linenos': [49L,
1311
+                             70L,
1312
+                             89L,
1313
+                             102L,
1314
+                             132L,
1315
+                             155L],
1316
+          'sel-line': 388L,
1317
+          'sel-line-start': 19109L,
1318
+          'selection_end': 19327L,
1319
+          'selection_start': 19109L,
1320
+          'zoom': 0L},
1321
+         1529840156.41],
1322
+        [loc('sources/filmas.py'),
1323
+         {'attrib-starts': [],
1324
+          'first-line': 230L,
1325
+          'folded-linenos': [],
1326
+          'sel-line': 240L,
1327
+          'sel-line-start': 10133L,
1328
+          'selection_end': 10133L,
1329
+          'selection_start': 10133L,
1330
+          'zoom': 0L},
1331
+         1529840172.146],
1332
+        [loc('sources/filmas.py'),
1333
+         {'attrib-starts': [('Source',
1334
+                             36)],
1335
+          'first-line': 28L,
1336
+          'folded-linenos': [],
1337
+          'sel-line': 36L,
1338
+          'sel-line-start': 1035L,
1339
+          'selection_end': 1047L,
1340
+          'selection_start': 1041L,
1341
+          'zoom': 0L},
1342
+         1529840175.605]],
1384
         20),
1343
         20),
1385
-        'current-loc': loc('sources/replay.py'),
1344
+        'current-loc': loc('sources/filmas.py'),
1386
         'editor-state-list': [(loc('run.py'),
1345
         'editor-state-list': [(loc('run.py'),
1387
                                {'attrib-starts': [('Main',
1346
                                {'attrib-starts': [('Main',
1388
         22),
1347
         22),
1438
                                 'selection_start': 47188L,
1397
                                 'selection_start': 47188L,
1439
                                 'zoom': 0L}),
1398
                                 'zoom': 0L}),
1440
                               (loc('sources/replay.py'),
1399
                               (loc('sources/replay.py'),
1441
-                               {'attrib-starts': [('Source',
1442
-        31),
1443
-        ('Source.get_streams',
1444
-         206)],
1445
-                                'first-line': 247L,
1400
+                               {'attrib-starts': [],
1401
+                                'first-line': 384L,
1446
                                 'folded-linenos': [49L,
1402
                                 'folded-linenos': [49L,
1447
         70L,
1403
         70L,
1448
         89L,
1404
         89L,
1449
         102L,
1405
         102L,
1450
         132L,
1406
         132L,
1451
         155L],
1407
         155L],
1452
-                                'sel-line': 257L,
1453
-                                'sel-line-start': 13118L,
1454
-                                'selection_end': 13118L,
1455
-                                'selection_start': 13118L,
1408
+                                'sel-line': 388L,
1409
+                                'sel-line-start': 19109L,
1410
+                                'selection_end': 19327L,
1411
+                                'selection_start': 19109L,
1456
                                 'zoom': 0L}),
1412
                                 'zoom': 0L}),
1457
                               (loc('sources/lmt.py'),
1413
                               (loc('sources/lmt.py'),
1458
                                {'attrib-starts': [('Source',
1414
                                {'attrib-starts': [('Source',
1516
                                 'sel-line-start': 5356L,
1472
                                 'sel-line-start': 5356L,
1517
                                 'selection_end': 5392L,
1473
                                 'selection_end': 5392L,
1518
                                 'selection_start': 5389L,
1474
                                 'selection_start': 5389L,
1475
+                                'zoom': 0L}),
1476
+                              (loc('sources/filmas.py'),
1477
+                               {'attrib-starts': [('Source',
1478
+        36),
1479
+        ('Source.get_streams',
1480
+         108)],
1481
+                                'first-line': 159L,
1482
+                                'folded-linenos': [],
1483
+                                'sel-line': 169L,
1484
+                                'sel-line-start': 7404L,
1485
+                                'selection_end': 7404L,
1486
+                                'selection_start': 7404L,
1519
                                 'zoom': 0L})],
1487
                                 'zoom': 0L})],
1520
-        'has-focus': True,
1488
+        'has-focus': False,
1521
         'locked': False},
1489
         'locked': False},
1522
         [loc('run.py'),
1490
         [loc('run.py'),
1523
          loc('util.py'),
1491
          loc('util.py'),
1528
          loc('resolver.py'),
1496
          loc('resolver.py'),
1529
          loc('sources/config.py'),
1497
          loc('sources/config.py'),
1530
          loc('changelog.md'),
1498
          loc('changelog.md'),
1531
-         loc('sources/filmix.py')]),
1499
+         loc('sources/filmix.py'),
1500
+         loc('sources/filmas.py')]),
1532
                                'open_files': [u'changelog.md',
1501
                                'open_files': [u'changelog.md',
1533
         u'resolver.py',
1502
         u'resolver.py',
1503
+        u'run.py',
1534
         u'sources/config.py',
1504
         u'sources/config.py',
1535
         u'sources/euronews.py',
1505
         u'sources/euronews.py',
1536
         u'sources/filmix.py',
1506
         u'sources/filmix.py',
1537
         u'sources/lmt.py',
1507
         u'sources/lmt.py',
1538
         u'sources/ltc.py',
1508
         u'sources/ltc.py',
1539
         u'util.py',
1509
         u'util.py',
1540
-        u'run.py',
1541
-        u'sources/replay.py']},
1510
+        u'sources/replay.py',
1511
+        u'sources/filmas.py']},
1542
         'saved_notebook_display': None,
1512
         'saved_notebook_display': None,
1543
         'split_percents': {0: 0.47474747474747475},
1513
         'split_percents': {0: 0.47474747474747475},
1544
         'splits': 2,
1514
         'splits': 2,
1553
                          0,
1523
                          0,
1554
                          2431,
1524
                          2431,
1555
                          1440)}]}
1525
                          1440)}]}
1556
-guimgr.recent-documents = [loc('sources/replay.py'),
1557
-                           loc('run.py'),
1526
+guimgr.recent-documents = [loc('sources/filmas.py'),
1527
+                           loc('sources/replay.py'),
1558
                            loc('util.py'),
1528
                            loc('util.py'),
1529
+                           loc('run.py'),
1559
                            loc('sources/ltc.py'),
1530
                            loc('sources/ltc.py'),
1560
                            loc('sources/filmix.py'),
1531
                            loc('sources/filmix.py'),
1561
                            loc('sources/lmt.py'),
1532
                            loc('sources/lmt.py'),

+ 27
- 24
sources/filmas.py View File

37
 class Source(SourceBase):
37
 class Source(SourceBase):
38
 
38
 
39
     def __init__(self, country="",cfg_path=None):
39
     def __init__(self, country="",cfg_path=None):
40
-        self.hidden = True # nerāda menu nestrādājošos avotus
40
+        self.hidden = False # nerāda menu nestrādājošos avotus
41
         self.name = "filmas"
41
         self.name = "filmas"
42
         self.title = "Filmas.lv"
42
         self.title = "Filmas.lv"
43
         self.img = "filmas.png"
43
         self.img = "filmas.png"
66
         if clist=="home":
66
         if clist=="home":
67
             content.extend([
67
             content.extend([
68
                 ("Meklēt", "filmas::filmu-katalogs/?mn={0}&tab=movies&sub_tab=movies-search","","Meklēt"),
68
                 ("Meklēt", "filmas::filmu-katalogs/?mn={0}&tab=movies&sub_tab=movies-search","","Meklēt"),
69
-                ("Visas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-2","","Visur skatam visas filmas"),
70
-                ("Spēlfilmas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-2&mp20=112","","Visur skatamās spēlfilmas"),
71
-                ("Animācijas filmas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-2&mp20=113","","Visur skatamās animācijas filmas"),
72
-                ("Dokumentalās filmas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-2&mp20=111","","Visur skatamās dokumentalās filmas"),
73
-                ("Kinohronikas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-2&mp20=150","","Visur skatamās kinohronikas")    ,
69
+                ("Visas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-1","","Visur skatam visas filmas"),
70
+                ("Spēlfilmas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-1&mp20=112","","Visur skatamās spēlfilmas"),
71
+                ("Animācijas filmas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-1&mp20=113","","Visur skatamās animācijas filmas"),
72
+                ("Dokumentalās filmas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-1&mp20=111","","Visur skatamās dokumentalās filmas"),
73
+                ("Kinohronikas", "filmas::filmu-katalogs/?tab=movies&sub_tab=movies-view-1&mp20=150","","Visur skatamās kinohronikas")    ,
74
             ])
74
             ])
75
             return content
75
             return content
76
 
76
 
152
 
152
 
153
             ### Key request ###
153
             ### Key request ###
154
             headers["Origin"] = "https://www.filmas.lv"
154
             headers["Origin"] = "https://www.filmas.lv"
155
-            r=requests.get(url,headers=headers, verify=False)
156
-            url_key = re.search('#EXT-X-KEY:METHOD=AES-128,URI="(.+?)"', r.content, re.IGNORECASE | re.MULTILINE).group(1)
157
-            r=requests.get(url_key,headers=headers, cookies={"filmassession":filmassession,"PHPSESSID":phpsessid}, verify=False)
158
-            key = r.content if not "error" in r.content else ""
155
+            headers["Cookie"] = 'filmassession=%s; PHPSESSID=%s' % (filmassession, phpsessid)
156
+            #r=requests.get(url,headers=headers, verify=False)
157
+            #url_key = re.search('#EXT-X-KEY:METHOD=AES-128,URI="(.+?)"', r.content, re.IGNORECASE | re.MULTILINE).group(1)
158
+            #r=requests.get(url_key,headers=headers, cookies={"filmassession":filmassession,"PHPSESSID":phpsessid}, verify=False)
159
+            #key = r.content if not "error" in r.content else ""
159
 
160
 
160
             stream = util.item()
161
             stream = util.item()
161
             stream["name"] = title
162
             stream["name"] = title
162
             stream["url"] = url
163
             stream["url"] = url
163
             stream["img"] = img
164
             stream["img"] = img
164
             stream["desc"] = desc
165
             stream["desc"] = desc
165
-            stream["headers"] = {"key":binascii.b2a_hex(key)}
166
+            stream["headers"] = headers #{"key":binascii.b2a_hex(key)}
166
             stream["quality"] = h[2]
167
             stream["quality"] = h[2]
167
             stream["order"] = int(h[1])
168
             stream["order"] = int(h[1])
168
             stream["resolver"] = "filmas"
169
             stream["resolver"] = "filmas"
214
 
215
 
215
 
216
 
216
 if __name__ == "__main__":
217
 if __name__ == "__main__":
218
+
217
     #url = "http://localhost:88/https%3A//as2.filmas.lv/FilmasLV/508D4024A83FDC1AA61D727DE5046D12/index-f3-v1-a1.m3u8?~key=4cb5c12b2aaa3d2cf211583cc9add2dd"
219
     #url = "http://localhost:88/https%3A//as2.filmas.lv/FilmasLV/508D4024A83FDC1AA61D727DE5046D12/index-f3-v1-a1.m3u8?~key=4cb5c12b2aaa3d2cf211583cc9add2dd"
218
     #download_hls(url, "video", "")
220
     #download_hls(url, "video", "")
219
 
221
 
220
-    c = Source()
221
-    if len(sys.argv)>1:
222
-        data= sys.argv[1]
223
-    else:
224
-        data = "movie/3112/"
225
-    if "movie" in data:
226
-        if data.startswith("http"):
227
-            data = data.replace("https://www.filmas.lv/","")
228
-        streams = c.get_streams(data)
229
-        #for s in streams:
230
-        s = streams[0]
231
-        download_hls(s["url"],"%s %s"%(s["name"],s["quality"]),"",s["headers"])
232
-        sys.exit()
222
+#     c = Source()
223
+#     if len(sys.argv)>1:
224
+#         data= sys.argv[1]
225
+#     else:
226
+#         data = "movie/3112/"
227
+#     if "movie" in data:
228
+#         if data.startswith("http"):
229
+#             data = data.replace("https://www.filmas.lv/","")
230
+#         streams = c.get_streams(data)
231
+#         #for s in streams:
232
+#         s = streams[0]
233
+#         download_hls(s["url"],"%s %s"%(s["name"],s["quality"]),"",s["headers"])
234
+#         sys.exit()
235
+
233
     sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
236
     sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
234
     import run
237
     import run
235
     source = Source()
238
     source = Source()