Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ const metascraper = require('metascraper')([

- [metascraper-amazon](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-amazon) – Metascraper integration for Amazon.
- [metascraper-bluesky](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-bluesky) – Metascraper integration for Bluesky.
- [metascraper-dribbble](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-dribbble) – Metascraper integration for Dribble.
- [metascraper-instagram](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-instagram) – Metascraper integration for Instagram.
- [metascraper-soundcloud](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-soundcloud) – Metascraper integration for SoundCloud.
- [metascraper-spotify](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-spotify) – Metascraper integration for Spotify.
Expand Down
8 changes: 8 additions & 0 deletions packages/metascraper-dribbble/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [5.49.21](https://github.com/microlinkhq/metascraper/compare/v5.49.20...v5.49.21) (2026-01-27)

**Note:** Version bump only for package metascraper-dribbble
22 changes: 22 additions & 0 deletions packages/metascraper-dribbble/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div align="center">
<br>
<img style="width: 500px; margin:3rem 0 1.5rem;" src="https://metascraper.js.org/static/logo-banner.png" alt="metascraper">
<br>
<br>
<p align="center"><strong>metascraper-dribbble</strong>: Metascraper integration with Dribbble.</p>
<p align="center">See our <a href="https://metascraper.js.org" target='_blank' rel='noopener noreferrer'>website</a> for more information.</p>
<br>
</div>

## Install

```bash
$ npm install metascraper-dribbble --save
```

## License

**metascraper-dribbble** © [Microlink](https://microlink.io), released under the [MIT](https://github.com/microlinkhq/metascraper/blob/master/LICENSE.md) License.<br>
Authored and maintained by [Microlink](https://microlink.io) with help from [contributors](https://github.com/microlinkhq/metascraper/contributors).

> [microlink.io](https://microlink.io) · GitHub [microlinkhq](https://github.com/microlinkhq) · X [@microlinkhq](https://dribbble/microlinkhq)
41 changes: 41 additions & 0 deletions packages/metascraper-dribbble/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "metascraper-dribbble",
"description": "Metascraper integration for Dribbble",
"homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-dribbble",
"version": "5.49.21",
"types": "src/index.d.ts",
"main": "src/index.js",
"author": {
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"repository": {
"directory": "packages/metascraper-dribbble",
"type": "git",
"url": "git+https://github.com/microlinkhq/metascraper.git"
},
"bugs": {
"url": "https://github.com/microlinkhq/metascraper/issues"
},
"keywords": [
"metascraper",
"dribbble"
],
"dependencies": {
"@metascraper/helpers": "workspace:*"
},
"devDependencies": {
"ava": "5"
},
"engines": {
"node": ">= 16"
},
"files": [
"src"
],
"scripts": {
"test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
},
"license": "MIT"
}
2 changes: 2 additions & 0 deletions packages/metascraper-dribbble/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare function rules(): import('metascraper').Rules;
export = rules;
68 changes: 68 additions & 0 deletions packages/metascraper-dribbble/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
'use strict'

const {
$jsonld,
memoizeOne,
author,
date,
description,
parseUrl,
toRule
} = require('@metascraper/helpers')

const toAuthor = toRule(author)
const toDate = toRule(date)
const toDescription = toRule(description)

const test = memoizeOne(url => parseUrl(url).domain === 'dribbble.com')

const parseMetaDescription = memoizeOne(description => {
if (!description || !description.includes(' | ')) {
return { author: null, description: null }
}

const parts = description.split(' | ')
// Remove the last part if it's "Connect with them on Dribbble..."
if (
parts.length > 1 &&
parts[parts.length - 1].includes('Connect with them on Dribbble')
) {
parts.pop()
}

return {
author: parts.length > 0 ? parts[0] : null,
description: parts.length > 1 ? parts.slice(1).join(' | ') : null
}
})

module.exports = () => {
const rules = {
author: [
toAuthor($jsonld('creator.name')),
toAuthor($ => {
const description = $('meta[name="description"]').attr('content')
const { author } = parseMetaDescription(description)
return author
}),
toAuthor($ => $('h1').first().text())
],
description: [
toDescription($ => {
const desc = $('meta[name="description"]').attr('content')
const { description } = parseMetaDescription(desc)
return description
})
],
date: [toDate($jsonld('uploadDate'))],
publisher: () => 'Dribbble'
}

rules.test = ({ url }) => test(url)

rules.pkgName = 'metascraper-dribbble'

return rules
}

module.exports.test = test
Loading
Loading