Skip to content

Commit 11ebd56

Browse files
authored
Merge pull request #842 from fa0311/develop
update
2 parents 8895c02 + 35b6d86 commit 11ebd56

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

generator.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@
9393

9494
logging.info("script decode is completed")
9595

96+
# === x-client-transaction-id ===
97+
98+
ondemand = script_load_output["ondemand.s"]
99+
ondemand_response = twitter.session.get(ondemand, headers=twitter.get_header(), timeout=twitter.TIMEOUT).text
100+
INDICES_REGEX = re.compile(
101+
r"""(\(\w{1}\[(\d{1,2})\],\s*16\))+""", flags=(re.VERBOSE | re.MULTILINE)
102+
)
103+
ondemand_index = INDICES_REGEX.findall(ondemand_response)
104+
transaction_output = {"index": [int(i[1]) for i in ondemand_index]}
105+
96106
# === Road ===
97107

98108
if CACHE and os.path.isfile("debug/script_response.txt"):
@@ -147,17 +157,6 @@
147157
dispatch_output = split_dispatch(get_dispatch(parsed_list))
148158
logging.info("get_dispatch is completed")
149159

150-
# === x-client-transaction-id ===
151-
152-
ondemand = script_load_output["ondemand.s"]
153-
ondemand_response = twitter.session.get(ondemand, headers=twitter.get_header(), timeout=twitter.TIMEOUT).text
154-
INDICES_REGEX = re.compile(
155-
r"""(\(\w{1}\[(\d{1,2})\],\s*16\))+""", flags=(re.VERBOSE | re.MULTILINE)
156-
)
157-
ondemand_index = INDICES_REGEX.findall(ondemand_response)
158-
transaction_output = {"index": [int(i[1]) for i in ondemand_index]}
159-
160-
161160
# feature_switches_output = get_feature_switches(parsed_list)
162161
# logging.info("get_feature_switches is completed")
163162

0 commit comments

Comments
 (0)