-1
내가 그래서 (random.cat하는 요청을 전송함으로써) URL을 검색 : 인터넷에서 파일을 읽으시겠습니까?
print('Importing REQUESTS')
import requests
import json
import urllib
response = (requests.get("http://random.cat/meow"))
response = str(response.content)
print(response)
response = response.replace("b'","")
response = response.replace("'","")
response = response.replace("\\","")
print(response)
data = json.loads(response)
print (data["file"])`
그럼 내가 사용을 열려고은 :
:
with open(line, 'rb') as f:
print("work")`
나는이 오류
Traceback (most recent call last):
File "G:/catimages.py", line 21, in <module>
with open(line, 'rb') as f:
OSError: [Errno 22] Invalid argument: 'http://random.cat/i/8Vilp.jpg' `
아이디어가 있으십니까?