#Refactor Code

master
MickSlash 2022-12-14 22:41:34 +00:00
parent 4e498f3c3b
commit 7c73ddaed7
1 changed files with 2 additions and 6 deletions

View File

@ -72,7 +72,7 @@ def apiOneDrive(folderType=None,nameFile=None):
if r.status_code == 200:
r = r.json()
data = r["folder"]["value"]
if r["next"]:
if "next" in r:
while "next" in r:
nextLink = r["next"]
r = session.get(f"{apiURL}&next={nextLink}").json()
@ -101,7 +101,3 @@ def fileFinderDB(nameFile, rawURL, data, counter):
def writeToText(text):
with open('link_modificati.txt', 'a', encoding='utf-8') as f:
f.write(f"{text}\n")
apiOneDrive("MLIF/")