Bonsoir,
Avec les réponses que vous m'avez fournis et des recherches sur le net, j'ai résolu mon soucis.
OneDrive:
Après avoir récupéré le lien du fichier, il faut modifié l'URL en replaçant
embed par
download
lien original: "
https://onedrive.live.com/[b]
embed[/b]?cid=45DE09AB45010121&resid=45DE09AB45010121%213237&authkey=AHjJ0Wc-_jtqpeo"
lien modifié: "
https://onedrive.live.com/[b]
download[/b]?cid=45DE09AB45010121&resid=45DE09AB45010121%213237&authkey=AHjJ0Wc-_jtqpeo"
Code : Tout sélectionner
InitNetwork()
Lien$ = "https://onedrive.live.com/download?cid=45DE09AB45010121&resid=45DE09AB45010121%213237&authkey=AHjJ0Wc-_jtqpeo"
NomDeFichier$ = "c:\Users\Jacky\Downloads\" + "Onedrive.jpg"
If ReceiveHTTPFile(Lien$, NomDeFichier$)
Debug "Succès"
Else
Debug "Echec"
EndIf
GoogleDrive:
Après avoir récupéré le lien du fichier, il faut modifié l'URL en gardant id du fichier et modifier l'url
lien original: "
https://drive.google.com/file/d/0B_PDPZ4SJxWielNCSkYxNDBMUG8/view?usp=sharing"
lien modifié: "
https://drive.google.com/[b]
uc?export=download&id=[/b]
0B_PDPZ4SJxWielNCSkYxNDBMUG8"
Code : Tout sélectionner
InitNetwork()
;https://drive.google.com/file/d/0B_PDPZ4SJxWielNCSkYxNDBMUG8/view?usp=sharing
Lien$ = "https://drive.google.com/uc?export=download&id=0B_PDPZ4SJxWielNCSkYxNDBMUG8"
NomDeFichier$ = "c:\Users\Jacky\Downloads\" + "Googledrive.png"
If ReceiveHTTPFile(Lien$, NomDeFichier$)
Debug "Succès"
Else
Debug "Echec"
EndIf
Voilà si çà peut servir.
Cordialement.
Jacky