kylon / Sharedown

Electron application to download Sharepoint videos (especially meant for students)
GNU General Public License v3.0
372 stars 41 forks source link

Direct Access Denied - Carn't download videos #73

Closed sobaum closed 1 year ago

sobaum commented 1 year ago

I'm having an issue downloading videos from sharepoint. I have access to the video via Stream but the direct access is denied.

The ytdlp log shows:

[generic] Extracting URL: https://xxxxx-my.sharepoint.com/personal/xxxxx/Documents/Gravaxxxxx.mp4

[generic] xxxxx: Downloading webpage

[redirect] Following redirect to https://xxxxx-my.sharepoint.com/personal/xxxxx/_layouts/15/AccessDenied.aspx?Source=https%3A%2F%2Fxxxxx%2Dmy%2Esharepoint%2Ecom%2Fpersonal%2Fxxxxx%2FDocuments%2FGravaxxxxxxxxxmp4&correlation=6bffdca0%2D5054%2D4000%2D4f87%2D6a7b779a6145&Type=item&name=530bb345%2D9910%2D4243%2Da833%2D09eeaa91fc45&listItemId=86370&listItemUniqueId=be9c5663%2Dfaad%2D4c5a%2Db428%2D402b92d4e62e

[generic] Extracting URL: https://xxxxx-my.sharepoint.com/personal/xxxxx/_layouts/15/AccessDenied.aspx...Db428%2D402b92d4e62e [generic] AccessDenied: Downloading webpage

WARNING: [generic] Falling back on generic information extractor

[generic] AccessDenied: Extracting information

ERROR: Unsupported URL: https://xxxxx-my.sharepoint.com/personal/xxxxxx/_layouts/15/AccessDenied.aspx?Source=............

kylon commented 1 year ago

direct access means you are using the direct downloader option?

if yes, that may not work for you, please try other options if no, it seems like the url you provided may be wrong? use the copy option from the context menu in sharepoint

sobaum commented 1 year ago

I've tried the 3 options, none worked.

The provided URL is correct, this is the Sharedown log:

startDownload: start

startDownload: valid data: true

runPuppeteerGetVideoData: goto https://xxxxxxxx-my.sharepoint.com/:v:/g/personal/xxxxxxxxx/EWNWnL6t-lpMtChAK5LU5i4BJYe8thgwFieyIHK7D1x7xw?web=1

_sharepointLogin: start login procedure

runPuppeteerGetVideoData: no json body on catched response: https://xxxxxxx-my.sharepoint.com/personal/xxxxxxxxxxxx/_api/web/GetListUsingPath(DecodedUrl=@a1)/RenderListDataAsStream?@a1=%27%2Fpersonal%2Fxxxxxxxxxxxxx%2FDocuments%27&TryNewExperienceSingle=TRUE Could not load body for this request. This might happen if the request is a preflight request.

_makeDirectUrl: no filterlink in vID: /personal/xxxxxxxx/Documents/Gravações/xxxxxxxxxxxxx.mp4

makeDirectUrl: rootfolder: /personal/xxxxxxxx/Documents/Gravações/xxxxxxxx.mp4 webUrl: https:,,xxxxxxxxxxxx-my.sharepoint.com,personal,xxxxxxxxxxxx final: https://xxxxxxxxxxx-my.sharepoint.com/personal/xxxxxxxxxxxx/Documents/Gravações/xxxxxxxxxxx.mp4

runPuppeteerGetVideoData: direct mode: linkAr: ["https:","","xxxxxxx-my.sharepoint.com","personal","xxxxxxxxx","Documents","Gravações","xxxxxxxxxxxxx.mp4"]

cookies: ["SIMI","rtFa","MicrosoftApplicationsTelemetryFirstLaunchTime","FedAuth","MicrosoftApplicationsTelemetryDeviceId"]

downloadVideo: has vdata: true

startDownload: selected cc4eff4b26

YT-dlp: download failed: Exit code: 1

DownloadFail event: YT-dlp error:

Exit code: 1

kylon commented 1 year ago

can you post a log with ffmpeg or yt-dlp?

sobaum commented 1 year ago

I've already postei ytdlp log

The ytdlp log shows:

[generic] Extracting URL: https://xxxxx-my.sharepoint.com/personal/xxxxx/Documents/Gravaxxxxx.mp4

[generic] xxxxx: Downloading webpage

[redirect] Following redirect to https://xxxxx-my.sharepoint.com/personal/xxxxx/_layouts/15/AccessDenied.aspx?Source=https%3A%2F%2Fxxxxx%2Dmy%2Esharepoint%2Ecom%2Fpersonal%2Fxxxxx%2FDocuments%2FGravaxxxxxxxxxmp4&correlation=6bffdca0%2D5054%2D4000%2D4f87%2D6a7b779a6145&Type=item&name=530bb345%2D9910%2D4243%2Da833%2D09eeaa91fc45&listItemId=86370&listItemUniqueId=be9c5663%2Dfaad%2D4c5a%2Db428%2D402b92d4e62e

[generic] Extracting URL: https://xxxxx-my.sharepoint.com/personal/xxxxx/_layouts/15/AccessDenied.aspx...Db428%2D402b92d4e62e [generic] AccessDenied: Downloading webpage

WARNING: [generic] Falling back on generic information extractor

[generic] AccessDenied: Extracting information

ERROR: Unsupported URL: https://xxxxx-my.sharepoint.com/personal/xxxxxx/_layouts/15/AccessDenied.aspx?Source=............

kylon commented 1 year ago

your log is direct download, i mean set yt-dlp or ffmpeg as downloader in settings, not direct make sure to save the changes

sobaum commented 1 year ago

Changed to yt-dlp and it worked. I think the settings maybe didn't saved the first time. You may close this issue.