#Refactor Code
parent
4e498f3c3b
commit
7c73ddaed7
|
@ -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/")
|
Loading…
Reference in New Issue