This repository contains a script to fetch/parse data from the 3D Filament Profiles website.
Public Resources:
- Filaments: https://3dfilamentprofiles.com/filaments [ sample / raw ]
- Brands: https://3dfilamentprofiles.com/brands [ sample / raw ]
- Materials: https://3dfilamentprofiles.com/materials
- Dryers: https://3dfilamentprofiles.com/dryers
Authenticated Resources:
- My Filaments: https://3dfilamentprofiles.com/my/filaments (requires authentication)
Some resources (like myfilaments
) require authentication:
-
Email/Password Login (Recommended):
./parser.py login
This will prompt for your email and password, then save the authentication token to
.env
-
GitHub OAuth / Manual Authentication:
- Visit https://3dfilamentprofiles.com/my/filaments
- Open the browser's DevTools (F12) > Application > Cookies
- Copy the
*auth-token*
value(s) to.env
(see .env.example)
Parse sample files:
./parser.py --file ./sample-filaments-raw.rsc --resource filaments > sample-filaments.json
Fetch and parse:
./parser.py --fetch filaments > filaments.json
Command line arguments:
usage: parser.py [-h] [--login] [--fetch RESOURCE] [--file FILE] [--resource RESOURCE]
optional arguments:
-h, --help show this help message and exit
Login:
--login Login to 3dfilamentprofiles.com (only used by 'myfilaments')
Source:
--fetch RESOURCE Fetch one of: filaments, brands, materials, dryers, myfilaments
--file FILE path to the file to parse
Parse:
--resource RESOURCE Parse one of: filaments, brands, materials, dryers, myfilaments; defaults to --fetch
Examples:
# Fetch public filaments
./parser.py --fetch filaments > filaments.json
# Fetch authenticated user's filaments (requires AUTH_COOKIES in .env, see.env.example)
./parser.py --fetch myfilaments > my-filaments.json