Created
March 17, 2025 20:26
-
-
Save minimasoft/3c1571258ac5cc7a54f101cd2955caa1 to your computer and use it in GitHub Desktop.
misa capitulada
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pathlib import Path | |
| from json import load as load_json | |
| with open('misa.json', 'r', encoding='utf-8') as f: | |
| dan = load_json(f) | |
| cap_size = 256 | |
| i = 0 | |
| c = 0 | |
| l = len(dan) | |
| while(i<l): | |
| capitulo = dan[i:i+cap_size] | |
| c += 1 | |
| i = cap_size * c | |
| with open(f"misa_capitulo_{c}.csv", "w", encoding="utf-8") as cap_file: | |
| headers = "'id','screen_name','name','description','profile_image_url'\n" | |
| cap_file.write(headers) | |
| for subnormal in capitulo: | |
| cap_file.write(f"{subnormal['id']},{subnormal['screen_name']},{subnormal['name']},no fui a la ezcuela,{subnormal['profile_image_url']}\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment