import ytdl from 'ytdl-core';
// ....
fastify.get('/ytmp3', async (req, res) => {
let { id, lang } = req.query;
if (!ytdl.validateID(id)) {
res.send({
result: false,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface BaseTextEntities extends Record<string, unknown> { | |
offset: number; | |
length: number; | |
className: string; | |
} | |
type TextEntities = [BaseTextEntities, string]; | |
export function filterUrls(entity: TextEntities[]): Array<string> { | |
return entity | |
.filter(([_e]) => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Apk Build | |
on: workflow_dispatch | |
jobs: | |
build-android: | |
runs-on: ubuntu-latest | |
env: | |
commit-hash: ${{ github.sha }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: c-hive/gha-yarn-cache@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout --orphan new | |
# completely rewrite your application in new framework | |
git merge --strategy=ours --allow-unrelated-histories main | |
git commit-tree -p HEAD^2 -p HEAD^1 -m "Merge branch 'new'" "HEAD^{tree}" | |
git reset --hard $OUTPUT_FROM_PREVIOUS_COMMAND | |
git checkout main | |
git merge --ff-only new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkg install python wget -y && pip install telethon && wget https://raw.githubusercontent.com/TeamUltroid/ultroid/main/resources/session/ssgen.py && python3 ssgen.py |