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.
supcommunity-api
Advanced tools
Readme
A lightweight module allowing you to scrape the Supcommunity website with NodeJS.
npm install supcommunity-api
Or with yarn,
yarn add supcommunity-api
supcommunity-api is an es6 based library, so if you use the es5 require
to import the module, you will need to use .default
.
const SupcommunityScraper = require('supcommunity-api').default;
//Continue usage as normal
supcommunity-api is a promise based library, which means you can use .catch
, .then
, and await
Supcommunity has updated their formatting of items. This update adapts to the new structure of their website.
The SupcommunityScraper
constructor takes in 1 option - a proxy
. Please format this using the normal proxy format ip:port:user:password
.
import SupcommunityScraper from 'supcommunity-api';
const SupcommunityController = new SupcommunityScraper({
proxy: 'your-proxy-here'
});
The fetchLatestWeek
method will return the latest droplist URL.
For example:
import SupcommunityScraper from 'supcommunity-api';
const SupcommunityController = new SupcommunityScraper();
SupcommunityController.fetchLatestWeek()
.then(href => console.log(href)) -> "https://www.supremecommunity.com/season/spring-summer2021/droplists/"
.catch(err => console.error(err.message));
The fetchDroplistItems
method will return all the items from a drop URL in an array.
This takes in the href
parameter, the droplist URL to retrieve from.
For example:
import SupcommunityScraper from 'supcommunity-api';
const SupcommunityController = new SupcommunityScraper();
(async () => {
const latestWeek = await SupcommunityController.fetchLatestWeek();
const droplistItems = await SupcommunityController.fetchDroplistItems(latestWeek);
console.log(droplistItems);
})();
[
{
name: String,
image: String,
category: String,
price: String,
positiveVotes: Number,
negativeVotes: Number,
votePercentage: Number
}
]
FAQs
Lightweight Supcommunity scraper in NodeJS
The npm package supcommunity-api receives a total of 0 weekly downloads. As such, supcommunity-api popularity was classified as not popular.
We found that supcommunity-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.