Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Codebase to work with YouTube.js and yt-dlp #23

Open
Guuzzeji opened this issue Mar 18, 2023 · 0 comments
Open

Refactor Codebase to work with YouTube.js and yt-dlp #23

Guuzzeji opened this issue Mar 18, 2023 · 0 comments
Assignees
Labels
💡 feature New feature or request

Comments

@Guuzzeji
Copy link
Owner

Guuzzeji commented Mar 18, 2023

Is your feature request related to a problem? Please describe.
Code is old and not optimize for scale. Also fixes #22 issue.

Describe the solution you'd like

  • Making the code base much more optimized and scalable using typescript
  • Up to date using YouTube.js
  • Adding yt-dlp, for better downloads and fix issue using ytdl-core

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

Fix for timestamp finder (From ChatGPT):

function extractTimestampsFromDescription(description) {
  const lines = description.split('\n');
  const timestamps = [];
  
  // Explain: Getting maches for hh:mm:ss and mm:ss
  const timestampRegex = /\d{1,2}:\d{2}(:\d{2})?/g;
  
  for (const line of lines) {
    const matches = line.match(timestampRegex);
    // Checking if we have a match to it
    // TODO: Have to modify this to JSON format
    if (matches) {
      for (const match of matches) {
        timestamps.push(match);
      }
    }
  }
  
  return timestamps;
}
@Guuzzeji Guuzzeji added the 💡 feature New feature or request label Mar 18, 2023
@Guuzzeji Guuzzeji self-assigned this Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant