MCPcopy Create free account
hub / github.com/fa0311/TwitterInternalAPIDocument / marge_metadata

Function marge_metadata

lib/graphql.py:116–128  ·  view source on GitHub ↗
(graphql_output: list, feature_switch: dict)

Source from the content-addressed store, hash-verified

114
115
116def marge_metadata(graphql_output: list, feature_switch: dict) -> list:
117 for i in range(len(graphql_output)):
118 graphql_output[i]["exports"]["metadata"]["featureSwitch"] = {}
119 for switch in graphql_output[i]["exports"]["metadata"]["featureSwitches"]:
120 for k in feature_switch:
121 if switch == k:
122 graphql_output[i]["exports"]["metadata"]["featureSwitch"][
123 switch
124 ] = feature_switch[k]
125 break
126 else:
127 logging.warning("NotFoundKey: " + switch)
128 return graphql_output
129
130
131def get_freeze_object(parsed_list: list, disable_tqdm=True) -> list:

Callers 1

generator.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected