Код: Выделить всё
import json
inputFileDir = ""
outputFileDir = ""
def processHtml(html):
return(1)
with open(inputFileDir, "r", encoding = "utf-8") as f, open(outputFileDir, "w", encoding='utf-8') as g:
for jsonLine in f:
html = json.loads(jsonLine)
html = processHtml(html)
json.dump(html, g)
g.write('\n')
Можно ли построчно обрабатывать файл .ndjson внутри этого файла .tar.gz без необходимости распаковки файла .tar.gz?>
Подробнее здесь: https://stackoverflow.com/questions/798 ... ompression
Мобильная версия