#Refactor Code
parent
4e498f3c3b
commit
7c73ddaed7
|
@ -72,7 +72,7 @@ def apiOneDrive(folderType=None,nameFile=None):
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
r = r.json()
|
r = r.json()
|
||||||
data = r["folder"]["value"]
|
data = r["folder"]["value"]
|
||||||
if r["next"]:
|
if "next" in r:
|
||||||
while "next" in r:
|
while "next" in r:
|
||||||
nextLink = r["next"]
|
nextLink = r["next"]
|
||||||
r = session.get(f"{apiURL}&next={nextLink}").json()
|
r = session.get(f"{apiURL}&next={nextLink}").json()
|
||||||
|
@ -100,8 +100,4 @@ def fileFinderDB(nameFile, rawURL, data, counter):
|
||||||
|
|
||||||
def writeToText(text):
|
def writeToText(text):
|
||||||
with open('link_modificati.txt', 'a', encoding='utf-8') as f:
|
with open('link_modificati.txt', 'a', encoding='utf-8') as f:
|
||||||
f.write(f"{text}\n")
|
f.write(f"{text}\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
apiOneDrive("MLIF/")
|
|
Loading…
Reference in New Issue