Skip to content

Instantly share code, notes, and snippets.

View bitfishxyz's full-sized avatar
🐥
🐔🐔🥚🥚

medium003 bitfishxyz

🐥
🐔🐔🥚🥚
View GitHub Profile

Upon receiving a YouTube video link from the user, do the following:

  1. Extract the videoID from the video link.

  2. Use this videoID as a parameter to call the YouTubeCaption Action.

  3. If the return value is abnormal, inform the user of the reason for the abnormality.

  4. If the return value is normal, provide the user with a file download link using the following Python code:

    url = 'https://you-tube-caption-express-server-shuai1996.replit.app/?videoID=' + videoID
<!DOCTYPE html>
<html>
<body>
<form>
Username: <input type="text" name="username" />
Password:<input type="text" name="password" />
Email:<input type="text" name="email" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
font-size: 150px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
<style>
body, button{
font-size: 30px;
}
.red{
color: red;
function isNative (Ctor){
return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
}
const inBrowser = typeof window !== 'undefined'
const inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform
const weexPlatform = inWeex && WXEnvironment.platform.toLowerCase()
const UA = inBrowser && window.navigator.userAgent.toLowerCase()
const isIE = UA && /msie|trident/.test(UA)
const isIE9 = UA && UA.indexOf('msie 9.0') > 0
const isEdge = UA && UA.indexOf('edge/') > 0
const isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android')
const isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios')
const isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge
function countFrequency(arr){
let result = new Map();
for(let element of arr){
if(result.get(element)) {
result.set(element, result.get(element) + 1)
} else {
result.set(element, 1)
}
}
return result;
// Get the price of apples from a fruit store
function getApplePrice(fruitStore) {
'start visiting the fruit store';
'walk to the fruit shop';
if('the fruit store was not open'){
'stop the process of visiting the fruit store';
return false;
}
'the apple purchase process begins';
'Declare a variable `lowestPriceFruitStore`, used to represent the fruit store with the lowest apple prices.';
for(fruitStore of [fruitStroe0, fruitStroe1, fruitStroe2]){
'start visiting the fruit store';
'walk to the fruit shop';
if('the fruit store was not open'){
'stop the process of visiting the fruit store';
}
'the apple purchase process begins';
// try to visit these 3 fruit stores in turn
for(fruitStore of [fruitStroe0, fruitStroe1, fruitStroe2]){
'start visiting the fruit store';
'walk to the fruit shop';
if('the fruit store was not open'){
'stop the process of visiting the fruit store';
}