{"id":50958252,"url":"https://github.com/meshhouse/node-sfmlab-client","last_synced_at":"2026-06-18T10:02:33.565Z","repository":{"id":52487436,"uuid":"392426770","full_name":"Meshhouse/node-sfmlab-client","owner":"Meshhouse","description":"Unofficial SFMLab-based sites client, written on Typescript, decoupled from sfmlab-unofficial-api.","archived":false,"fork":false,"pushed_at":"2022-08-03T18:36:00.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-03-21T03:27:44.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Meshhouse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-03T19:07:15.000Z","updated_at":"2022-08-03T18:34:18.000Z","dependencies_parsed_at":"2022-09-06T15:40:19.879Z","dependency_job_id":null,"html_url":"https://github.com/Meshhouse/node-sfmlab-client","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/Meshhouse/node-sfmlab-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meshhouse%2Fnode-sfmlab-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meshhouse%2Fnode-sfmlab-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meshhouse%2Fnode-sfmlab-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meshhouse%2Fnode-sfmlab-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Meshhouse","download_url":"https://codeload.github.com/Meshhouse/node-sfmlab-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meshhouse%2Fnode-sfmlab-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34485169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-18T10:02:32.737Z","updated_at":"2026-06-18T10:02:33.556Z","avatar_url":"https://github.com/Meshhouse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-sfmlab-client\nUnofficial SFMLab-based sites client, written on Typescript, decoupled from sfmlab-unofficial-api.\n```\nThis repository stays for history purpose, but SFMLab client is closed for breaking website's terms of use.\n```\n\n# Requirements\nIt's intended to use with Node.js, not tested with browser environment.\n\n# Installation\n```bash\nnpm install github:Meshhouse/node-sfmlab-client\n```\n\n# Usage\nSupported sites:\n* https://sfmlab.com (SFMLab class)\n* https://smutba.se (Smutbase class)\n* https://open3dlab.com (Open3DLab class)\n\n## Creating new instance\n```js\nimport { SFMLab, Smutbase, Open3DLab } from 'node-sfmlab-client';\n\n\nconst sfmlabInstance = new SFMLab();\nconst smutbaseInstance = new Smutbase();\nconst open3dlabInstance = new Open3DLab(['http://localhost:8080']); // Tells current instance to use proxy servers\n```\n\n## Authenticate user\nEven if accounts is same across those sites, cookies is domain-locked\n```js\nconst credentials = {\n  login: '\u003cyour_login\u003e',\n  password: '\u003cyour_password\u003e'\n};\n\nconst usercookies = await sfmlabInstance.authenticate(credentials);\n// Returns serialized cookies (can be used for future authentication, without request to origin)\n```\n\n## Re-authenticate user (using previously saved cookies)\n```js\nconst usercookies = '\u003cserialized_cookies\u003e'\n\nsfmlabInstance.setCookieJar(usercookies);\n```\n\n## Get user info\nAssumed, that you already authenticated\n\n```js\nconst user = await sfmlabInstance.getUser();\n\n{\n  id: 0,\n  username: 'test',\n  avatar: 'user_avatar,\n  created_at: 0\n}\n```\n\n## Fetch index page\n```js\nconst response = await sfmlabInstance.getModels();\n\n{\n  models: ['see example below'],\n  pagination: {\n    page: 1,\n    totalPages: 100\n  }\n}\n```\n\nAvailable params (SFMLab):\n```ts\ntype SFMLabQuery = {\n  category?: number;\n  order?: 'created' | '-created' | 'published_date' | '-published_date' | 'last_file_date' | '-last_file_date' | 'views' | '-views' | 'popularity' | '-popularity';\n  search?: string;\n  page?: number;\n  adultContent?: boolean;\n  furryContent?: boolean;\n  tags?: number[];\n  universe?: number[];\n  character?: number[];\n}\n```\n\nAvailable params (Smutbase, Open3DLab):\n```ts\ntype SmutbaseQuery = {\n  order?: 'created' | '-created' | 'published_date' | '-published_date' | 'last_file_date' | '-last_file_date' | 'views' | '-views' | 'popularity' | '-popularity';\n  search?: string;\n  page?: number;\n  tags?: number[];\n  universe?: number[];\n  character?: number[];\n  software?: number[];\n}\n```\n\n## Fetch single model\nSome models can be hidden from unauthenticated users, in that case method returns HTTP 404 error\n\n```js\nconst model = await sfmlabInstance.getSingleModel(26959);\n\n{\n  id: 26959,\n  title: 'Heroes of the Storm - Tyrande',\n  author: 'SFMLab-Import',\n  thumbnail: 'https://thumb.sfmlab.com/item-preview/item_preview/111111_uh2hMER.detail.png',\n  extension: '.sfm',\n  mature_content: true,\n  created_at: 1435132740000,\n  images: [\n    'https://thumb.sfmlab.com/item-preview/item_preview/111111_uh2hMER.detail.png'\n  ],\n  links: [\n    {\n      url: 'file_url',\n      title: 'Tyrande_WO1Z2KA.zip',\n      file_size: '3.01 MB'\n    }\n  ],\n  tags: [\n    'heroes of the storm',\n    'world of warcraft',\n    'tyrande whisperwind',\n    'character',\n    'elf',\n    'fantasy',\n    'female',\n    'warcraft',\n    'source'\n  ],\n  commentaries: []\n  file_size: '3.01 MB'\n}\n\n```\n\n## Fetch model commentaries\nIn case you want to fetch comments only\n```js\nconst commentaries = await sfmlabInstance.getModelComments(26959);\n\n[\n  {\n    name: 'username',\n    avatar: 'avatar_url',\n    message: 'sanitized_message',\n    date: 0,\n  }\n]\n```\n\n## Fetch filters\n```js\nconst filters = await sfmlabInstance.getAvailableFilters();\n// Or reuse parser from getModels handler\nconst response = await sfmlabInstance.getModels({}, true);\nconst filters = await sfmlabInstance.getAvailableFilters(response.parser);\n\n{\n  categories: [\n    { text: 'text', value: '0' }\n  ],\n  characters: [\n    { text: 'text', value: '0' }\n  ],\n  software: [\n    { text: 'text', value: '0' }\n  ],\n  tags: [\n    { text: 'text', value: '0' }\n  ],\n  universes: [\n    { text: 'text', value: '0' }\n  ]\n}\n```\n\n# Proxy support\nYou can use proxy/proxies to bypass HTTP 429 error. Proxy support handled by [hpagent](https://github.com/delvedor/hpagent) package. To use proxy, you need to pass in class constructor array of proxy addresses:\n```js\nconst proxies = [\n  'http://127.0.0.1:8080',\n  'http://127.0.0.1:8081',\n  'http://127.0.0.1:8082'\n];\n\nconst instance = new SFMLab(proxies);\n```\nProxy address selected by Math.random, sometimes request will be sended without proxy (also for bypass HTTP 429 error)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshhouse%2Fnode-sfmlab-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeshhouse%2Fnode-sfmlab-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshhouse%2Fnode-sfmlab-client/lists"}