mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 19:28:29 +00:00
refactor: variable names
This commit is contained in:
parent
e88f2dc8e2
commit
ae04bc032b
@ -1,7 +1,7 @@
|
|||||||
import { genericUserAgent } from "../../config.js";
|
import { genericUserAgent } from "../../config.js";
|
||||||
|
|
||||||
export default async function({ id }) {
|
export default async function({ id }) {
|
||||||
const req = await fetch(`https://odysee.com/${id}`, {
|
const requestText = await fetch(`https://odysee.com/${id}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
"user-agent": genericUserAgent
|
"user-agent": genericUserAgent
|
||||||
@ -11,8 +11,8 @@ export default async function({ id }) {
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|
||||||
// i couldn't find any other way to do this
|
// i couldn't find any other way to do this
|
||||||
var reqlines = req.split('\n');
|
var requestLines = requestText.split('\n');
|
||||||
var contentline = reqlines[reqlines.length - 32];
|
var contentline = requestLines[reqlines.length - 32];
|
||||||
var videoUrl = contentline.split('"')[3];
|
var videoUrl = contentline.split('"')[3];
|
||||||
|
|
||||||
if (videoUrl?.includes('.mp4')) {
|
if (videoUrl?.includes('.mp4')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user