Browse Source

ltc palabots

Ivars 7 years ago
parent
commit
838244871c
3 changed files with 103 additions and 115 deletions
  1. 102
    114
      project.wpr
  2. 1
    0
      run.bat
  3. 0
    1
      sources/ltc.py

+ 102
- 114
project.wpr View File

@@ -83,14 +83,10 @@ debug.breakpoints = {loc('iub.py'): {102: (0,
83 83
         None,
84 84
         1,
85 85
         0)},
86
-                     loc('sources/ltc.py'): {101L: (0,
86
+                     loc('sources/ltc.py'): {100L: (0,
87 87
         None,
88 88
         1,
89
-        0),
90
-        823L: (0,
91
-               None,
92
-               1,
93
-               0)},
89
+        0)},
94 90
                      loc('sources/replay.py'): {77L: (0,
95 91
         None,
96 92
         1,
@@ -782,7 +778,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
782 778
                                None)],
783 779
                  'primary_view_state': {'area': 'wide',
784 780
         'constraint': None,
785
-        'current_pages': [2,
781
+        'current_pages': [4,
786 782
                           0],
787 783
         'notebook_display': 'normal',
788 784
         'notebook_percent': 0.4761133603238866,
@@ -818,7 +814,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
818 814
                                        'fRegexFlags': 46,
819 815
                                        'fReplaceText': u'www.shortcut.lv',
820 816
                                        'fReverse': False,
821
-                                       'fSearchText': u'thumbnail',
817
+                                       'fSearchText': u'API_URL',
822 818
                                        'fStartPos': 0,
823 819
                                        'fStyle': 'text',
824 820
                                        'fWholeWords': False,
@@ -962,97 +958,14 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
962 958
                             22),
963 959
                            ('Main.show_pic',
964 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 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 969
         [loc('sources/ltc.py'),
1057 970
          {'attrib-starts': [('Source',
1058 971
                              28),
@@ -1218,9 +1131,81 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1218 1131
           'selection_end': 40597L,
1219 1132
           'selection_start': 40597L,
1220 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 1207
         20),
1223
-        'current-loc': loc('sources/ltc.py'),
1208
+        'current-loc': None,
1224 1209
         'editor-state-list': [(loc('ContentSources.py'),
1225 1210
                                {'attrib-starts': [('ContentSources',
1226 1211
         16),
@@ -1235,15 +1220,15 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1235 1220
                                 'zoom': 0L}),
1236 1221
                               (loc('sources/ltc.py'),
1237 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 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 1232
                                 'zoom': 0L}),
1248 1233
                               (loc('util.py'),
1249 1234
                                {'attrib-starts': [('unescape',
@@ -1342,7 +1327,8 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1342 1327
          loc('sources/lmt.py'),
1343 1328
          loc('sources/mtgplay.py'),
1344 1329
          loc('sources/filmas.py'),
1345
-         loc('sources/SourceBase.py')]),
1330
+         loc('sources/SourceBase.py'),
1331
+         loc('unknown:untitled-1.py')]),
1346 1332
                                'open_files': [u'sources/SourceBase.py',
1347 1333
         u'sources/cinemalive.py',
1348 1334
         u'sources/lmt.py',
@@ -1352,7 +1338,8 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1352 1338
         u'sources/filmas.py',
1353 1339
         u'ContentSources.py',
1354 1340
         u'run.py',
1355
-        u'sources/ltc.py']},
1341
+        u'sources/ltc.py',
1342
+        'unknown:untitled-1.py']},
1356 1343
         'saved_notebook_display': None,
1357 1344
         'split_percents': {0: 0.5261845386533666},
1358 1345
         'splits': 2,
@@ -1367,7 +1354,8 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1367 1354
                          -1080,
1368 1355
                          1858,
1369 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 1359
                            loc('run.py'),
1372 1360
                            loc('ContentSources.py'),
1373 1361
                            loc('sources/filmas.py'),
@@ -1883,7 +1871,8 @@ proj.env-vars = {None: ('default',
1883 1871
                         [u''])}
1884 1872
 search.replace-history = [u'www.shortcut.lv',
1885 1873
                           u'shortcut.lv']
1886
-search.search-history = [u'thumbnail',
1874
+search.search-history = [u'API_URL',
1875
+                         u'thumbnail',
1887 1876
                          u'http:',
1888 1877
                          u'www.lattelecom.tv',
1889 1878
                          u'http://www',
@@ -1901,8 +1890,7 @@ search.search-history = [u'thumbnail',
1901 1890
                          u'player(',
1902 1891
                          u'sys.arg',
1903 1892
                          u'escape',
1904
-                         u'play_stream',
1905
-                         u'lamb']
1893
+                         u'play_stream']
1906 1894
 testing.stored-results = (1,
1907 1895
                           [],
1908 1896
                           {})

+ 1
- 0
run.bat View File

@@ -0,0 +1 @@
1
+pythonw -u run.py

+ 0
- 1
sources/ltc.py View File

@@ -21,7 +21,6 @@ import ssl
21 21
 if "_create_unverified_context" in dir(ssl):
22 22
     ssl._create_default_https_context = ssl._create_unverified_context
23 23
 
24
-API_URL = 'https://m.lattelecom.tv/'
25 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 25
 headers2dict = lambda  h: dict([l.strip().split(": ") for l in h.strip().splitlines()])
27 26
 h = HTMLParser.HTMLParser()