mirror of
https://github.com/BradNut/personal-website-sveltekit
synced 2025-09-08 23:20:18 +00:00
Using an environmental variable for Bandcamp username
This commit is contained in:
parent
7a0ff588a8
commit
55c679da68
1 changed files with 2 additions and 2 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
// import * as htmlparser2 from 'htmlparser2';
|
import { BANDCAMP_USERNAME } from '$env/static/private';
|
||||||
import scrapeIt from 'scrape-it';
|
import scrapeIt from 'scrape-it';
|
||||||
import type { Album } from '../types/album';
|
import type { Album } from '../types/album';
|
||||||
|
|
||||||
export async function fetchBandcampAlbums() {
|
export async function fetchBandcampAlbums() {
|
||||||
try {
|
try {
|
||||||
const { data } = await scrapeIt('https://bandcamp.com/royvalentine', {
|
const { data } = await scrapeIt(`https://bandcamp.com/${BANDCAMP_USERNAME}`, {
|
||||||
collectionItems: {
|
collectionItems: {
|
||||||
listItem: '.collection-item-container',
|
listItem: '.collection-item-container',
|
||||||
data: {
|
data: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue