Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
boxrec
Advanced tools
Changelog
8.0.5 (2022-06-11)
null
because the selector had changed. Selector is more flexible now.Readme
This project allows you to query information from BoxRec and return it in JSON format. The purpose of this project is to act as an unofficial API for BoxRec. This project is not affiliated with BoxRec.
BoxRec has put in some work that will throw captchas if making too many quick requests and IP block you if you trip their firewall. For the sole purpose of blocking packages like this, which is understandable. But at the cost of making it a worse UX for actual people. If you use this project you put yourself at risk of being IP banned by BoxRec for some time, not by user but by IP. This is automatic from their firewall and not something they do manually. There are ways to get by this but nothing to discuss about at this time. Use this package for learning purposes at this time.
A few years ago a lot of time was spent on this project, but not so much at the time of this update. With the changes that go into BoxRec, it is always a game of cat and mouse when it comes to keeping things working. Do not expect this package to continuously work.
If you do find issues, please raise an issue so others are aware and so they can be triaged.
Thanks
This project is written in Node. Currently this project supports Node 8+.
npm install boxrec --save
yarn add boxrec
const boxrec = require("boxrec").Boxrec;
or
import {Boxrec as boxrec} from "boxrec";
Use credentials to log into BoxRec and then use any of the methods below. Pass the cookie into all methods.
example:
try {
const cookies = await boxrec.login(BOXREC_USERNAME, BOXREC_PASSWORD);
// successfully logged in
} catch (e) {
// error occurred logging in
}
Please read the documentation on how to use these methods
getBoutById
getBoxerPDF
getBoxerPrint
getChampions
getDate
getEventById
getEventsByLocation
getPeopleByLocation
getPeopleByName
getPersonById
getRatings
getResults
getSchedule
getTitleById
getTitles
getVenueById
getWatched
login
search
unwatch
watch
The return values are a class instance that can parse the data. To return the entire JSON object, use the output
accessor.
const boxer = await boxrec.getPersonById(352);
const {output} = boxer;
Details on how to help can be found here
This link shows all the methods, the parameters and the expected response
What and where is the BoxRec global ID?
The BoxRec global ID or ID is the unique ID of the person, event, bout, etc. It can be found in the URL bar. For people it can also be found on their page.
examples:
(Person) Vasiliy Lomachenko - http://boxrec.com/en/boxer/659771. The BoxRec global ID is 659771
.
(Bout) Terence Crawford vs. Amir Khan - http://boxrec.com/en/event/778793/2299385. The BoxRec bout ID is 778793/2299385
(Event) Golden Boy May 4th 2019 Event - http://boxrec.com/en/event/781894. The BoxRec event ID is 781894
Why is there global ID and ID?
I took the safe approach and assumed that there may be some difference between the two.
When this software was initially written, the Terms and Conditions on BoxRec did not include anything about web scraping.
BoxRec had updated their Terms and Conditions sometime in the middle of 2018 to include that you may not use software to extract data from BoxRec.
Web scraping on wikipedia states under legal issues "The legality of web scraping varies across the world. In general, web scraping may be against the terms of use of some websites, but the enforceability of these terms is unclear".
Conclusion: It is unclear. What you do with this package though could very well be illegal.
FAQs
Retrieve information from BoxRec and return it in JSON format
The npm package boxrec receives a total of 68 weekly downloads. As such, boxrec popularity was classified as not popular.
We found that boxrec 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
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.