behance-node
v1.0.0
Published
An asynchronous module for scrapping Behance using JavaScript.
Readme
Behance-node
An asynchronous module for scrapping Behance using JavaScript.
Install
npm i behance-nodeUsage
const Behance = require('behance-node');Documentation
User data
Return data about user.
Method:
user(username: string, detailed?: boolean)
Parameters:
| Name | Type | Info | | ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | |
username| string | Desired username | |detailed| boolean | Return more detail about user or not |Example:
- Get detailed data about this user
https://www.behance.net/moesalah.Behance.user('moesalah', true) .then( result => console.log(result) ) .catch( error => console.log(error) );
- Get detailed data about this user
Project data
Return data about project.
Method:
project(path: string)
Parameter:
| Name | Type | Info | | ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | |
path| string | Desired project path, must contain project id and name |Example:
- Get data about this project
https://www.behance.net/gallery/77156181/Amazon-Rebranding-UI-Concept.Behance.project('77156181/Amazon-Rebranding-UI-Concept') .then( result => console.log(result) ) .catch( error => console.log(error) );
- Get data about this project
Random project
Get a random project data using sort.
Method:
randomProject( sort?: 'recommended' | 'curated' | 'most_appreciated' | 'most_viewed' | 'most_commented' | 'most_recent', time?: 'today' | 'this_week' | 'this_month' | 'all_time' )
Parameters:
| Name | Type | Info | | ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | |
sort|recommended,curated,most_appreciated,most_viewed,most_commented,most_recent| Onlymost_appreciated,most_viewed,most_commentedcan be used withtimeparameter | |time|today,this_week,this_month,all_time| Sort result by date |Examples:
- Get a random project from most viewed this week.
Behance.randomProject('most_viewed', 'this_week') .then( result => console.log(result) ) .catch( error => console.log(error) ); - Get a random curated project.
Behance.randomProject('curated') .then( result => console.log(result) ) .catch( error => console.log(error) );
- Get a random project from most viewed this week.
