MCPcopy Create free account
hub / github.com/Maccoder3/MAC-MD / post

Function post

lib/y2mate.js:5–15  ·  view source on GitHub ↗
(url, formdata)

Source from the content-addressed store, hash-verified

3
4const ytv = async yutub => {
5 function post(url, formdata) {
6 return fetch(url, {
7 method: 'POST',
8 headers: {
9 accept: '*/*',
10 'accept-language': 'en-US,en;q=0.9',
11 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
12 },
13 body: new URLSearchParams(Object.entries(formdata)),
14 })
15 }
16 const ytIdRegex =
17 /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/
18 let ytId = ytIdRegex.exec(yutub)

Callers 2

ytvFunction · 0.85
ytaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected