|
|
|
|
@ -248,7 +248,7 @@ public class LiveParser { |
|
|
|
|
if (header == null) header = new HashMap<>(); |
|
|
|
|
if (line.contains("#EXTHTTP:")) header.putAll(Json.toMap(JsonParser.parseString(line.split("#EXTHTTP:")[1].trim()))); |
|
|
|
|
if (line.contains("header=")) header.putAll(Json.toMap(JsonParser.parseString(line.split("header=")[1].trim()))); |
|
|
|
|
} catch (Exception ignored) { |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
header = null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -257,11 +257,18 @@ public class LiveParser { |
|
|
|
|
try { |
|
|
|
|
if (header == null) header = new HashMap<>(); |
|
|
|
|
extract(line.split("headers=")[1].trim()); |
|
|
|
|
} catch (Exception ignored) { |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
header = null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void extract(String line) { |
|
|
|
|
for (String s : line.split("&")) { |
|
|
|
|
String[] a = s.split("="); |
|
|
|
|
header.put(a[0].trim(), a[1].trim()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void convert() { |
|
|
|
|
try { |
|
|
|
|
ClearKey.objectFrom(key); |
|
|
|
|
@ -270,13 +277,6 @@ public class LiveParser { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void extract(String line) { |
|
|
|
|
for (String s : line.split("&")) { |
|
|
|
|
String[] a = s.split("="); |
|
|
|
|
header.put(a[0].trim(), a[1].trim()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void clear() { |
|
|
|
|
ua = null; |
|
|
|
|
key = null; |
|
|
|
|
|