INNER CODE UNIT · Python
get_feature_switches
fa0311/TwitterInternalAPIDocument · lib/graphql.py:160
def get_feature_switches(parsed_list: list) -> list:
reg_exports = r"e\.exports={var}$".format(var=r"([a-zA-Z]{1,2})")
exports_list = search_js_reg(parsed_list, reg_exports)
for exports in exports_list:
feature_switches = get_freeze_object(exports.parent, disable_tqdm=True)
if len(feature_switches) > 0:
return feature_switches[0]
def to_api(graphql_output: list, kwargs: dict) -> dict:
variable_converter = {
"!0": True,
"!1": False,
"true": True,
"false": False,
}
api_output = {"graphql": {}}