# 1. import 라이브러리
import pandas as pd
import requests, json
# 2. path 경로 설정
path = 'C:\잡다\deeplearning_from_scratch_img'
# 3. for문 돌리기
for page in range(1, 315):
url = f'https://online.fliphtml5.com/qvagj/edfm/files/large/{page}.jpg?1585412846'
response = requests.get(url)
# 4. with open ~ as file
with open(f'{path}/{page}.png', "wb") as file: # image니까 "wb"
file.write(response.content) # image니까 이렇게!
f = open("foo.txt", 'w')
f.write("Life is too short, you need python")
f.close()
with open("foo.txt", "w") as f:
f.write("Life is too short, you need python")