mirror of
https://github.com/snobu/destreamer.git
synced 2026-02-13 01:59:42 +00:00
Add personal to URL regex to apply to more sites (#437)
* Add personal URL for new MS Teams recordings * Encode URI components to avoid unescape char
This commit is contained in:
@@ -175,7 +175,7 @@ export class ShareApiClient {
|
|||||||
AddRequiredFields: true
|
AddRequiredFields: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const url = `${this.site}/_api/web/GetListUsingPath(DecodedUrl=@a1)/RenderListDataAsStream?@a1='${filePath}'`;
|
const url = `${this.site}/_api/web/GetListUsingPath(DecodedUrl=@a1)/RenderListDataAsStream?@a1='${encodeURIComponent(filePath)}'`;
|
||||||
|
|
||||||
logger.verbose(`Requesting video info for '${url}'`);
|
logger.verbose(`Requesting video info for '${url}'`);
|
||||||
const info = await this.axiosInstance.post(url, payload, {
|
const info = await this.axiosInstance.post(url, payload, {
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ export async function downloadStreamVideo(videoUrls: Array<VideoUrl>): Promise<v
|
|||||||
|
|
||||||
// TODO: complete overhaul of this function
|
// TODO: complete overhaul of this function
|
||||||
export async function downloadShareVideo(videoUrls: Array<VideoUrl>): Promise<void> {
|
export async function downloadShareVideo(videoUrls: Array<VideoUrl>): Promise<void> {
|
||||||
const shareUrlRegex = new RegExp(/(?<domain>https:\/\/.+\.sharepoint\.com).*?(?<baseSite>\/(?:teams|sites)\/.*?)(?:(?<filename>\/.*\.mp4)|\/.*id=(?<paramFilename>.*mp4))/);
|
const shareUrlRegex = new RegExp(/(?<domain>https:\/\/.+\.sharepoint\.com).*?(?<baseSite>\/(?:teams|sites|personal)\/.*?)(?:(?<filename>\/.*\.mp4)|\/.*id=(?<paramFilename>.*mp4))/);
|
||||||
|
|
||||||
logger.info('Downloading SharePoint videos...\n\n');
|
logger.info('Downloading SharePoint videos...\n\n');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user