npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nerdologiatron

v2.0.0

Published

Algoritmo para filtro de comentários de um vídeo, utilizando a API do Youtube.

Downloads

12

Readme

Nerdologiatron 2.0

Serviço para filtrar comentários de um vídeo no Youtube utilizando a API v3.

Importante: Desenvolvido para Node.js a partir da versão 7.

home2

Configuração

Para utilizar o recurso, é necessário possuir o ID do vídeo que será acompanhado e uma Chave de API.

ID do Vídeo

Para obter a ID do vídeo, basta acessar o endereço do mesmo e abstrair de sua URL. O mesmo estará localizado logo após o https://www.youtube.com/watch?v=: home2

Chave de API

Para obter uma Chave de API siga os seguintes passos:

  • Acesse Google API Console
  • Crie um novo Projeto
  • Acesse no menu lateral a opção Painel
  • Ative o YouTube Data API
  • Acesse no menu lateral a opção de Credenciais
  • Crie uma nova credencial de Chave de API
  • Copie a chave e ignore a opção de restrição de acesso

Instalação

Para instalar, basta utilizar o comando via npm:

npm install nerdologiatron --save

API

new Nerdologiatron(key, video)

  • key String - Chave de API para acesso aos recursos do YouTube
  • video Object - ID do vídeo a ser acompanhado

Construtor da classe, instanciando variáveis de controle.

nerdologiatron.load([success[, error]])

  • success Function - Função a ser executada após o carregamento dos comentários com sucesso
  • error Function - Função a ser executada caso ocorra algum erro

Realiza as chamadas para obter e armazenar todos os comentários do vídeo.

nerdologiatron.filter(exp, lines, remove)

  • exp RegExp - Expressão regular responsável por filtrar as mensagens
  • lines Boolean - Indica se deve fragmentar as mensagens por quebra de linha
  • remove Boolean - Indica se deve remover as partes do texto que casam com a expressão regular

Filtra os comentários de acordo com um padrão determinado.

Retorna um Array contendo apenas os comentários filtrados.