Ivars 7 лет назад
Родитель
Сommit
838244871c
3 измененных файлов: 103 добавлений и 115 удалений
  1. 102
    114
      project.wpr
  2. 1
    0
      run.bat
  3. 0
    1
      sources/ltc.py

+ 102
- 114
project.wpr Просмотреть файл

83
         None,
83
         None,
84
         1,
84
         1,
85
         0)},
85
         0)},
86
-                     loc('sources/ltc.py'): {101L: (0,
86
+                     loc('sources/ltc.py'): {100L: (0,
87
         None,
87
         None,
88
         1,
88
         1,
89
-        0),
90
-        823L: (0,
91
-               None,
92
-               1,
93
-               0)},
89
+        0)},
94
                      loc('sources/replay.py'): {77L: (0,
90
                      loc('sources/replay.py'): {77L: (0,
95
         None,
91
         None,
96
         1,
92
         1,
782
                                None)],
778
                                None)],
783
                  'primary_view_state': {'area': 'wide',
779
                  'primary_view_state': {'area': 'wide',
784
         'constraint': None,
780
         'constraint': None,
785
-        'current_pages': [2,
781
+        'current_pages': [4,
786
                           0],
782
                           0],
787
         'notebook_display': 'normal',
783
         'notebook_display': 'normal',
788
         'notebook_percent': 0.4761133603238866,
784
         'notebook_percent': 0.4761133603238866,
818
                                        'fRegexFlags': 46,
814
                                        'fRegexFlags': 46,
819
                                        'fReplaceText': u'www.shortcut.lv',
815
                                        'fReplaceText': u'www.shortcut.lv',
820
                                        'fReverse': False,
816
                                        'fReverse': False,
821
-                                       'fSearchText': u'thumbnail',
817
+                                       'fSearchText': u'API_URL',
822
                                        'fStartPos': 0,
818
                                        'fStartPos': 0,
823
                                        'fStyle': 'text',
819
                                        'fStyle': 'text',
824
                                        'fWholeWords': False,
820
                                        'fWholeWords': False,
962
                             22),
958
                             22),
963
                            ('Main.show_pic',
959
                            ('Main.show_pic',
964
                             205)],
960
                             205)],
965
-         'first-line': 212L,
966
-         'folded-linenos': [125L,
967
-                            218L],
968
-         'sel-line': 234L,
969
-         'sel-line-start': 9191L,
970
-         'selection_end': 9219L,
971
-         'selection_start': 9210L,
961
+         'first-line': 227L,
962
+         'folded-linenos': [],
963
+         'sel-line': 233L,
964
+         'sel-line-start': 9166L,
965
+         'selection_end': 9182L,
966
+         'selection_start': 9182L,
972
          'zoom': 0L},
967
          'zoom': 0L},
973
-        1510681130.458],
974
-        [loc('run.py'),
975
-         {'attrib-starts': [('Main',
976
-                             22),
977
-                            ('Main.show_pic',
978
-                             205)],
979
-          'first-line': 213L,
980
-          'folded-linenos': [125L,
981
-                             218L],
982
-          'sel-line': 234L,
983
-          'sel-line-start': 9191L,
984
-          'selection_end': 9219L,
985
-          'selection_start': 9210L,
986
-          'zoom': 0L},
987
-         1510681132.541],
988
-        [loc('run.py'),
989
-         {'attrib-starts': [('VideoInfo',
990
-                             342),
991
-                            ('VideoInfo.body',
992
-                             369)],
993
-          'first-line': 399L,
994
-          'folded-linenos': [125L,
995
-                             218L],
996
-          'sel-line': 411L,
997
-          'sel-line-start': 16254L,
998
-          'selection_end': 16301L,
999
-          'selection_start': 16274L,
1000
-          'zoom': 0L},
1001
-         1510681141.598],
1002
-        [loc('run.py'),
1003
-         {'attrib-starts': [('Main',
1004
-                             22),
1005
-                            ('Main.show_pic',
1006
-                             205)],
1007
-          'first-line': 216L,
1008
-          'folded-linenos': [125L,
1009
-                             218L],
1010
-          'sel-line': 236L,
1011
-          'sel-line-start': 9254L,
1012
-          'selection_end': 9297L,
1013
-          'selection_start': 9297L,
1014
-          'zoom': 0L},
1015
-         1510681178.628],
1016
-        [loc('sources/ltc.py'),
1017
-         {'attrib-starts': [('Source',
1018
-                             28),
1019
-                            ('Source.get_info2',
1020
-                             761)],
1021
-          'first-line': 805L,
1022
-          'folded-linenos': [],
1023
-          'sel-line': 796L,
1024
-          'sel-line-start': 39186L,
1025
-          'selection_end': 39236L,
1026
-          'selection_start': 39231L,
1027
-          'zoom': 0L},
1028
-         1510681239.898],
1029
-        [loc('run.py'),
1030
-         {'attrib-starts': [('Main',
1031
-                             22),
1032
-                            ('Main.show_pic',
1033
-                             205)],
1034
-          'first-line': 232L,
1035
-          'folded-linenos': [125L,
1036
-                             218L],
1037
-          'sel-line': 236L,
1038
-          'sel-line-start': 9254L,
1039
-          'selection_end': 9297L,
1040
-          'selection_start': 9297L,
1041
-          'zoom': 0L},
1042
-         1510681246.656],
1043
-        [loc('run.py'),
1044
-         {'attrib-starts': [('Main',
1045
-                             22),
1046
-                            ('Main.show_pic',
1047
-                             205)],
1048
-          'first-line': 227L,
1049
-          'folded-linenos': [],
1050
-          'sel-line': 233L,
1051
-          'sel-line-start': 9166L,
1052
-          'selection_end': 9182L,
1053
-          'selection_start': 9182L,
1054
-          'zoom': 0L},
1055
-         1510681362.396],
968
+        1510681362.396],
1056
         [loc('sources/ltc.py'),
969
         [loc('sources/ltc.py'),
1057
          {'attrib-starts': [('Source',
970
          {'attrib-starts': [('Source',
1058
                              28),
971
                              28),
1218
           'selection_end': 40597L,
1131
           'selection_end': 40597L,
1219
           'selection_start': 40597L,
1132
           'selection_start': 40597L,
1220
           'zoom': 0L},
1133
           'zoom': 0L},
1221
-         1510695211.085]],
1134
+         1510695211.085],
1135
+        [loc('sources/ltc.py'),
1136
+         {'attrib-starts': [],
1137
+          'first-line': 14L,
1138
+          'folded-linenos': [],
1139
+          'sel-line': 23L,
1140
+          'sel-line-start': 762L,
1141
+          'selection_end': 769L,
1142
+          'selection_start': 762L,
1143
+          'zoom': 0L},
1144
+         1510733719.716],
1145
+        [loc('sources/ltc.py'),
1146
+         {'attrib-starts': [('Source',
1147
+                             28),
1148
+                            ('Source.call',
1149
+                             612)],
1150
+          'first-line': 608L,
1151
+          'folded-linenos': [],
1152
+          'sel-line': 615L,
1153
+          'sel-line-start': 31616L,
1154
+          'selection_end': 31642L,
1155
+          'selection_start': 31635L,
1156
+          'zoom': 0L},
1157
+         1510733721.696],
1158
+        [loc('sources/ltc.py'),
1159
+         {'attrib-starts': [('Source',
1160
+                             28),
1161
+                            ('Source.call2',
1162
+                             626)],
1163
+          'first-line': 620L,
1164
+          'folded-linenos': [],
1165
+          'sel-line': 629L,
1166
+          'sel-line-start': 32080L,
1167
+          'selection_end': 32106L,
1168
+          'selection_start': 32099L,
1169
+          'zoom': 0L},
1170
+         1510733722.432],
1171
+        [loc('sources/ltc.py'),
1172
+         {'attrib-starts': [],
1173
+          'first-line': 18L,
1174
+          'folded-linenos': [],
1175
+          'sel-line': 23L,
1176
+          'sel-line-start': 762L,
1177
+          'selection_end': 762L,
1178
+          'selection_start': 762L,
1179
+          'zoom': 0L},
1180
+         1510733735.325],
1181
+        [loc('sources/ltc.py'),
1182
+         {'attrib-starts': [('Source',
1183
+                             27),
1184
+                            ('Source.__init__',
1185
+                             29)],
1186
+          'first-line': 28L,
1187
+          'folded-linenos': [],
1188
+          'sel-line': 37L,
1189
+          'sel-line-start': 1407L,
1190
+          'selection_end': 1427L,
1191
+          'selection_start': 1420L,
1192
+          'zoom': 0L},
1193
+         1510733736.419],
1194
+        [loc('sources/ltc.py'),
1195
+         {'attrib-starts': [('Source',
1196
+                             27),
1197
+                            ('Source.get_tv_url',
1198
+                             697)],
1199
+          'first-line': 695L,
1200
+          'folded-linenos': [],
1201
+          'sel-line': 699L,
1202
+          'sel-line-start': 34373L,
1203
+          'selection_end': 34384L,
1204
+          'selection_start': 34381L,
1205
+          'zoom': 0L},
1206
+         1510739802.0]],
1222
         20),
1207
         20),
1223
-        'current-loc': loc('sources/ltc.py'),
1208
+        'current-loc': None,
1224
         'editor-state-list': [(loc('ContentSources.py'),
1209
         'editor-state-list': [(loc('ContentSources.py'),
1225
                                {'attrib-starts': [('ContentSources',
1210
                                {'attrib-starts': [('ContentSources',
1226
         16),
1211
         16),
1235
                                 'zoom': 0L}),
1220
                                 'zoom': 0L}),
1236
                               (loc('sources/ltc.py'),
1221
                               (loc('sources/ltc.py'),
1237
                                {'attrib-starts': [('Source',
1222
                                {'attrib-starts': [('Source',
1238
-        28),
1239
-        ('Source.get_content',
1240
-         75)],
1241
-                                'first-line': 278L,
1223
+        27),
1224
+        ('Source.get_tv_url',
1225
+         697)],
1226
+                                'first-line': 695L,
1242
                                 'folded-linenos': [],
1227
                                 'folded-linenos': [],
1243
-                                'sel-line': 288L,
1244
-                                'sel-line-start': 15877L,
1245
-                                'selection_end': 15964L,
1246
-                                'selection_start': 15964L,
1228
+                                'sel-line': 699L,
1229
+                                'sel-line-start': 34373L,
1230
+                                'selection_end': 34384L,
1231
+                                'selection_start': 34381L,
1247
                                 'zoom': 0L}),
1232
                                 'zoom': 0L}),
1248
                               (loc('util.py'),
1233
                               (loc('util.py'),
1249
                                {'attrib-starts': [('unescape',
1234
                                {'attrib-starts': [('unescape',
1342
          loc('sources/lmt.py'),
1327
          loc('sources/lmt.py'),
1343
          loc('sources/mtgplay.py'),
1328
          loc('sources/mtgplay.py'),
1344
          loc('sources/filmas.py'),
1329
          loc('sources/filmas.py'),
1345
-         loc('sources/SourceBase.py')]),
1330
+         loc('sources/SourceBase.py'),
1331
+         loc('unknown:untitled-1.py')]),
1346
                                'open_files': [u'sources/SourceBase.py',
1332
                                'open_files': [u'sources/SourceBase.py',
1347
         u'sources/cinemalive.py',
1333
         u'sources/cinemalive.py',
1348
         u'sources/lmt.py',
1334
         u'sources/lmt.py',
1352
         u'sources/filmas.py',
1338
         u'sources/filmas.py',
1353
         u'ContentSources.py',
1339
         u'ContentSources.py',
1354
         u'run.py',
1340
         u'run.py',
1355
-        u'sources/ltc.py']},
1341
+        u'sources/ltc.py',
1342
+        'unknown:untitled-1.py']},
1356
         'saved_notebook_display': None,
1343
         'saved_notebook_display': None,
1357
         'split_percents': {0: 0.5261845386533666},
1344
         'split_percents': {0: 0.5261845386533666},
1358
         'splits': 2,
1345
         'splits': 2,
1367
                          -1080,
1354
                          -1080,
1368
                          1858,
1355
                          1858,
1369
                          1080)}]}
1356
                          1080)}]}
1370
-guimgr.recent-documents = [loc('sources/ltc.py'),
1357
+guimgr.recent-documents = [loc('unknown:untitled-1.py'),
1358
+                           loc('sources/ltc.py'),
1371
                            loc('run.py'),
1359
                            loc('run.py'),
1372
                            loc('ContentSources.py'),
1360
                            loc('ContentSources.py'),
1373
                            loc('sources/filmas.py'),
1361
                            loc('sources/filmas.py'),
1883
                         [u''])}
1871
                         [u''])}
1884
 search.replace-history = [u'www.shortcut.lv',
1872
 search.replace-history = [u'www.shortcut.lv',
1885
                           u'shortcut.lv']
1873
                           u'shortcut.lv']
1886
-search.search-history = [u'thumbnail',
1874
+search.search-history = [u'API_URL',
1875
+                         u'thumbnail',
1887
                          u'http:',
1876
                          u'http:',
1888
                          u'www.lattelecom.tv',
1877
                          u'www.lattelecom.tv',
1889
                          u'http://www',
1878
                          u'http://www',
1901
                          u'player(',
1890
                          u'player(',
1902
                          u'sys.arg',
1891
                          u'sys.arg',
1903
                          u'escape',
1892
                          u'escape',
1904
-                         u'play_stream',
1905
-                         u'lamb']
1893
+                         u'play_stream']
1906
 testing.stored-results = (1,
1894
 testing.stored-results = (1,
1907
                           [],
1895
                           [],
1908
                           {})
1896
                           {})

+ 1
- 0
run.bat Просмотреть файл

1
+pythonw -u run.py

+ 0
- 1
sources/ltc.py Просмотреть файл

21
 if "_create_unverified_context" in dir(ssl):
21
 if "_create_unverified_context" in dir(ssl):
22
     ssl._create_default_https_context = ssl._create_unverified_context
22
     ssl._create_default_https_context = ssl._create_unverified_context
23
 
23
 
24
-API_URL = 'https://m.lattelecom.tv/'
25
 user_agent = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; da-dk) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3"
24
 user_agent = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; da-dk) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3"
26
 headers2dict = lambda  h: dict([l.strip().split(": ") for l in h.strip().splitlines()])
25
 headers2dict = lambda  h: dict([l.strip().split(": ") for l in h.strip().splitlines()])
27
 h = HTMLParser.HTMLParser()
26
 h = HTMLParser.HTMLParser()