小型可自定义的多处理多代理爬虫程序。
transpose-dict的Python项目详细描述
简单的python包来转换python字典。
安装转置指令
pip install transpose_dict
基本用法示例
fromtranspose_dictimportTDtest={"a":{"0":{"I":[1,2,3],"II":[4,5,6]}},"b":{"0":{"I":[8,9,10],"II":[467,23,23]},"1":{"III":[6,7,9]}}}TD(test,0)# The given dictionary does not change#> {"b": {"0": {"I": [8, 9, 10], "II": [467, 23, 23]}, "1": {"III": [6, 7, 9]}}, "a": {"0": {"I": [1, 2, 3], "II": [4, 5, 6]}}}TD(test,1)# The new main axis is the one with ("0", "1")#> {"0": {"a": {"I": [1, 2, 3], "II": [4, 5, 6]}, "b": {"I": [8, 9, 10], "II": [467, 23, 23]}}, "1": {"b": {"III": [6, 7, 9]}}}TD(test,2)# The new main axis is the one with ("I", "II", "III")#> {"I": {"a": {"0": [1, 2, 3]}, "b": {"0": [8, 9, 10]}}, "III": {"b": {"1": [6, 7, 9]}}, "II": {"a": {"0": [4, 5, 6]}, "b": {"0": [467, 23, 23]}}}
许可证
该软件是在麻省理工学院的许可下发布的。