[程式] 下載instagram正在Live直播

作者: andy199113 (Andy)   2023-12-16 23:53:33
請將游標移動到註解文字上再按鍵盤 Ctrl + Y 便可整行消除
應用程式:instagram-live-stream-recorder
程式分類:工具
程式連結:https://github.com/vadimb88/instagram-live-stream-recorder
程式專頁:無
程式介紹:
這是一套基於JavaScript語言開發程式,所以需要安裝 Node.js
https://nodejs.org/en/download/current
選擇你的系統對應的 比如微軟系統新電腦,Windows Installer (.msi) > 64bit
可以選擇用git下載,也可以直接按下綠色按鈕 <>code > Download ZIP
另外系統要安裝ffmpeg,Windows系統下,系統路徑要自行設定
https://ffmpeg.org/download.html
https://github.com/BtbN/FFmpeg-Builds/releases
解壓縮在你要執行的資料夾中,不過不要急著執行,
我當時安裝完遇到錯誤,還要多安裝這個
npm install xmldom
接著是比較關鍵的一步,設定cookies檔案,要取得自己instagram帳號的cookies,
當然這側錄直播可能讓你帳號被instagram官方警告,不過都已經想錄影應該不怕刪帳號
資料夾中找到template.config.default.json檔案打開來,
csrfToken和sessionId需要使用chrome firefox瀏覽器
打開瀏覽器,開啟instagram.com並且登入完成
工具找cookies法: 可以直接安裝擴充套件EditThisCookie看cookies
手動找cookies法:
打開開發者工具,快捷鍵是F11或F12
按下重新整理,開發者工具找到Network標籤,按下列表中第一個元件,
看右邊的Headers,找到Request Headers,會出現Cookie的內容複製出來,
找到對應的csrfToken和sessionId填入template.config.default.json,
把template.config.default.json檔名改成config.default.json
如果瀏覽器重新登入,要記得修改config.default.json的兩個值,以免無法錄影
接著等待直播開始就可以執行程式,開啟命令提示字元輸入
cd/d D:\IG\ ※切換到你解壓縮程式的資料夾路徑
node record.js -u 被錄製的id
作者: andy199113 (Andy)   2022-08-21 04:02:00
不能下載的修改辦法請參考issueshttps://github.com/vadimb88/instagram-live-stream-recorder/issues/1縮網址 https://shorturl.at/gCfdE

Links booklink

Contact Us: admin [ a t ] ucptt.com