Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
jericho-api
Advanced tools
Readme
Multi-Node-Api for Community Based Projects includes Custom-YoutubeApi and Many More Api's Wrappers and Many more will be included if you contact us and suggest us some great apis
$ npm install --save jericho-api
YoutubeVideo {
Id: 1,
videoId: '9UMxZofMNbA',
title: 'Chillout Lounge - Calm & Relaxing Background Music | Study, Work, Sleep, Meditation, Chill',
description: 'Short Description here [Edited for Scheme]',
duration_raw: '00:00',
duration: 0,
url: 'https://www.youtube.com/watch?v=9UMxZofMNbA',
uploadedAt: 'Started streaming on Jun 13, 2021',
views: 12902240,
thumbnail: YoutubeThumbnail {
thumbnailId: '9UMxZofMNbA',
width: 1920,
height: 1080,
url: 'https://i.ytimg.com/vi/9UMxZofMNbA/maxresdefault.jpg?v=60c5e7c1'
},
channel: YoutubeChannel {
name: 'The Good Life Radio x Sensual Musique',
verified: false,
channelId: 'UChs0pSaEoNLV4mevBFGaoKA',
icon: {
url: 'https://yt3.ggpht.com/ytc/AKedOLRolK5uaMIsmYQV2cHzxxC8qSCH5aQ18O3_PMJHwQ=s48-c-k-c0x00ffffff-no-rj',
width: 48,
height: 48
},
subscribers: '674K',
url: 'https://www.youtube.com/channel/UChs0pSaEoNLV4mevBFGaoKA'
},
likes: 109710,
dislikes: 0,
islive: true,
isprivate: false,
tags: [
'chill-out music',
'chill music',
'chillout',
'chill house',
'chill',
'out',
'music',
'deep house',
'deep',
'house',
'house music',
'dance music',
'edm',
'electronic dance music',
'the good life radio',
'the good life'
],
suggestionVideos: [ ...YoutubeVideo[] ]
// Here Recommendation Videos will be spotted But with soft fetch only | But you can fetch its total data by indivually -> <YoutubeVideo>.fetch() or fetch together by -> <YoutubeApiLTE>.getVideo(Url , searchOptions , true) and it will return hard fetch videos
}
const { YoutubeApiLTE } = require("jericho-api");
/**
* searchOptions -> Search Options for <YoutubeApiLTE>.search() method
*
* (@) We are giving headers for "User-Agent" But you can also give other or left it as undefined or enable "randomUserAgents": true
* (@) Search Options helps to filter the search results for Search Query URL and Axios get Response
*/
var searchOptions = {
AxiosHttpRequestConfigs: {
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0",
},
},
};
/**
* YoutubeInstance -> YoutubeInstance has been been created and all methods of Api calls will be used with it
*/
var YoutubeInstance = new YoutubeApiLTE(searchOptions);
/**
* Youtube_Video -> Fetching Video Metadata from Search Result and also added <YoutubeVideo>.fetch() to get all exact Hard fetched Data ("You can ignore fetch if you are okay with search results or Soft Data")
*/
var Youtube_Video = new Promise(async (resolve) => {
/**
* <YoutubeApiLTE>.search() function has been called here to fetch Search Results Data
*
* (@) Added Default "searchOptions" But its choice based
* (@) Added limit : 2 , To make only 2 Data or else you can give 1 and 0 for Infinty
* (@) Added type : 'video' , Filter Parsing in <Axios>.get() Search Query URL | Choices -> "channel","playlist","video","all"
*/
var Youtube_Video_Data = await YoutubeInstance.search(`Despacito`, {
...searchOptions,
type: "all",
limit: 2,
});
/**
* Youtube_Video_Data -> Checking for its validity as a Data because Search Result will give usually you search for it in Youtube
*/
if (!(Youtube_Video_Data?.[0] && Youtube_Video_Data?.[0]?.type === "video"))
resolve(undefined);
else {
/**
* <YoutubeVideo>.fetch()
*
* (@) Hard Fetching Data and parse it on same Instance to avoid buffer overflow and memory leaks
* (@) if you encounter "429" Erros , you can use cookies and proxies or diffrent user-agent to fetch data through 'Axios'
*/
await Youtube_Video_Data[0].fetch(searchOptions?.AxiosHttpRequestConfigs);
}
resolve(Youtube_Video_Data);
});
/**
* Youtube_Video -> Fetched <YoutubeVideo> Class Instance
*/
console.log(Youtube_Video);
var searchOptions = {
AxiosHttpRequestConfigs: {
cookie:
"xxxx=xyz-secret-youtube-cookie-browser-network-inspect-as-string-xxxx=xyznc",
},
};
// OR
var searchOptions = {
AxiosHttpRequestConfigs: {
cookies:
"xxxx=xyz-secret-youtube-cookie-browser-network-inspect-as-string-xxxx=xyznc",
},
};
var searchOptions = {
AxiosHttpRequestConfigs: {
proxy: "https://www.goggle.com:456",
},
};
// OR
var searchOptions = {
AxiosHttpRequestConfigs: {
proxy: { host: "www.google.com", port: 456 },
},
};
var searchOptions = {
AxiosHttpRequestConfigs: {
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0",
},
},
};
var searchOptions = {
AxiosHttpRequestConfigs: {},
};
FAQs
Multi-Node-Api for Community Based Projects includes Custom-YoutubeApi and Many More Api's Wrappers
The npm package jericho-api receives a total of 0 weekly downloads. As such, jericho-api popularity was classified as not popular.
We found that jericho-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.