mirror of
https://github.com/snobu/destreamer.git
synced 2026-02-19 12:59:43 +00:00
Fix API address to use Traffic Manager endpoint
This commit is contained in:
@@ -110,7 +110,6 @@ async function rentVideoForLater(videoUrls: string[], username: string, outputDi
|
|||||||
await browser.waitForTarget(target => target.url().includes('microsoftstream.com/'), { timeout: 90000 });
|
await browser.waitForTarget(target => target.url().includes('microsoftstream.com/'), { timeout: 90000 });
|
||||||
process.stdout.write('We are logged in. ');
|
process.stdout.write('We are logged in. ');
|
||||||
await sleep(1500);
|
await sleep(1500);
|
||||||
console.log('Sorry, i mean "you".');
|
|
||||||
|
|
||||||
for (let videoUrl of videoUrls) {
|
for (let videoUrl of videoUrls) {
|
||||||
let videoID = videoUrl.split('/').pop() ?? (console.error("Couldn't split the videoID, wrong url"), process.exit(25))
|
let videoID = videoUrl.split('/').pop() ?? (console.error("Couldn't split the videoID, wrong url"), process.exit(25))
|
||||||
@@ -192,7 +191,7 @@ async function getVideoInfo(videoID: string, accesToken: string) {
|
|||||||
let hlsUrl: string;
|
let hlsUrl: string;
|
||||||
|
|
||||||
let content = axios.get(
|
let content = axios.get(
|
||||||
`https://use2-2.api.microsoftstream.com/api/videos/${videoID}` +
|
`https://api.microsoftstream.com/api/videos/${videoID}` +
|
||||||
`?$expand=creator,tokens,status,liveEvent,extensions&api-version=${ApiVersion}`,
|
`?$expand=creator,tokens,status,liveEvent,extensions&api-version=${ApiVersion}`,
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Reference in New Issue
Block a user