From 6c53d8131a8fee9719c23ee577579505b2459323 Mon Sep 17 00:00:00 2001 From: patrickkfkan Date: Wed, 3 Feb 2021 18:09:12 +0800 Subject: [PATCH] Add getAllShows() and getShow() --- README.md | 20 + examples/getAllShows.js | 6 + examples/getAllShows_output.txt | 901 ++++++++++++++++++++++++++++++++ examples/getShow.js | 8 + examples/getShow_output.txt | 343 ++++++++++++ lib/index.js | 27 +- lib/parser.js | 75 ++- lib/utils.js | 23 +- 8 files changed, 1400 insertions(+), 3 deletions(-) create mode 100644 examples/getAllShows.js create mode 100644 examples/getAllShows_output.txt create mode 100644 examples/getShow.js create mode 100644 examples/getShow_output.txt diff --git a/README.md b/README.md index eb603df..2e297ce 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,26 @@ Searches for `params.query`. - albumImageFormat - artistImageFormat +### `getAllShows([options])` + +[**Example**](examples/getAllShows.js) ([output](examples/getAllShows_output.txt)) + +Fetches all Bandcamp shows. Each entry in the returned array contains basic information about a show. To retrieve details of a show, pass the `url` property of the entry to `getShow()`. + +- `options` (optional) + - showImageFormat + +### `getShow(showUrl, [options])` + +[**Example**](examples/getShow.js) ([output](examples/getShow_output.txt)) + +Get show details for the given `showUrl`. + +- `options` (optional) + - albumImageFormat + - artistImageFormat + - showImageFormat + ## Caching The library maintains an in-memory cache for two types of resources: diff --git a/examples/getAllShows.js b/examples/getAllShows.js new file mode 100644 index 0000000..5941d3c --- /dev/null +++ b/examples/getAllShows.js @@ -0,0 +1,6 @@ +const bcfetch = require('../'); +const util = require('util'); + +bcfetch.getAllShows().then( results => { + console.log(util.inspect(results, false, null, false)); +}); \ No newline at end of file diff --git a/examples/getAllShows_output.txt b/examples/getAllShows_output.txt new file mode 100644 index 0000000..a831877 --- /dev/null +++ b/examples/getAllShows_output.txt @@ -0,0 +1,901 @@ +[ { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=422', + publishedDate: '02 Feb 2021 00:00:00 GMT', + description: 'Arlo Parks talks about creating her debut LP and making the most of lockdown, plus new JD73\'s Electrio, Fracture, and William Parker.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Arlo Parks by Paul Grelet.', + subtitle: 'Opening Doors', + imageUrl: 'https://f4.bcbits.com/img/23496983_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/23496983_0' }, + { type: 'show', + name: 'The Hip-Hop Show', + url: 'https://bandcamp.com/?show=421', + publishedDate: '29 Jan 2021 00:00:00 GMT', + description: 'Ovrkast joins the show to discuss his latest album, Try Again. Plus sounds from Potatohead People, Isaiah Mclane, and Boom Baptist.', + imageCaption: 'Hosted by Stoney Creation. Illustration of Ovrkast by McKay Felt', + subtitle: '55 Degree Weather', + imageUrl: 'https://f4.bcbits.com/img/23443998_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/23443998_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=420', + publishedDate: '26 Jan 2021 00:00:00 GMT', + description: 'We dive into eclectic South African sounds via Indaba Is and highlight favorite new reissues.', + imageCaption: 'Andrew Jervis hosts. Thandi Nthuli and Siyabonga Mthembu by Hsiao-Ron Cheng.', + subtitle: 'On The Shoulders of Giants', + imageUrl: 'https://f4.bcbits.com/img/23399435_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/23399435_0' }, + { type: 'show', + name: 'The Metal Show ', + url: 'https://bandcamp.com/?show=419', + publishedDate: '22 Jan 2021 00:00:00 GMT', + description: 'Rising L.A true metal stars Saber join the show, plus jams from the latest Gatecreeper LP, and our Pick from the Crypt, Haunt.', + imageCaption: 'Hosted by Brad Sanders. Steve Villa and Joel Dominguez by Louise Pomeroy.', + subtitle: 'Saber Comes Without Warning', + imageUrl: 'https://f4.bcbits.com/img/23349301_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/23349301_0' }, + { type: 'show', + name: 'The Hip-Hop Show', + url: 'https://bandcamp.com/?show=418', + publishedDate: '15 Jan 2021 00:00:00 GMT', + description: 'The late MF DOOM is given his flowers, plus an interview with MC Jada Imani, and appearances from Stanley Ipkuss and Dirty Art Club. \n', + imageCaption: 'Hosted by Stoney Creation. Illustration of Jada Imani by McKay Felt', + subtitle: 'The Tales Of Doom & Ms. Imani', + imageUrl: 'https://f4.bcbits.com/img/23256365_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/23256365_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=416', + publishedDate: '12 Jan 2021 00:00:00 GMT', + description: 'New sounds for 2021, plus guests Guedra Guedra, Salami Rose Joe Louis, and Tommy Guerrero.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Guedra Guedra by Noopur Choksi.', + subtitle: 'New Year, New Faces, New Sounds', + imageUrl: 'https://f4.bcbits.com/img/23214457_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/23214457_0' }, + { type: 'show', + name: 'The Metal Show ', + url: 'https://bandcamp.com/?show=415', + publishedDate: '08 Jan 2021 00:00:00 GMT', + description: 'Jackie Perez Gratz of Grayceon stops by to discuss their new LP, and her old band Giant Squid is the show\'s first Pick from the Crypt', + imageCaption: 'Hosted by Brad Sanders. Illustration of Jackie Perez Gratz by Louise Pomeroy', + subtitle: 'Metal for a Burning Planet', + imageUrl: 'https://f4.bcbits.com/img/23166745_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/23166745_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=414', + publishedDate: '22 Dec 2020 00:00:00 GMT', + description: 'A super-sized episode, with guests galore, highlighting favorite artists, albums, and tunes of 2020.', + imageCaption: 'Hosted by Andrew Jervis. Illustration by Paul Grelet.', + subtitle: 'Lockdown Loves', + imageUrl: 'https://f4.bcbits.com/img/22958948_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22958948_0' }, + { type: 'show', + name: 'The Hip-Hop Show', + url: 'https://bandcamp.com/?show=413', + publishedDate: '18 Dec 2020 00:00:00 GMT', + description: 'Denise Chaila joins the show from Ireland to discuss her latest release, with additional appearances from AroMa and AJ the One.', + imageCaption: 'Hosted by Stoney Creation Illustration of Denise Chaila by McKay Felt', + subtitle: 'Ri Ra Rita', + imageUrl: 'https://f4.bcbits.com/img/22920109_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22920109_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=412', + publishedDate: '15 Dec 2020 00:00:00 GMT', + description: 'Reflect and escape to the sound of 2020, featuring Alabaster DePlume, Nicolas Jaar, Angel Bat Dawid, and Gavsborg.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Alabaster De Plume by Hsiao-Ron Cheng.', + subtitle: 'Reflections Eternal', + imageUrl: 'https://f4.bcbits.com/img/22876592_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22876592_0' }, + { type: 'show', + name: 'The Metal Show', + url: 'https://bandcamp.com/?show=411', + publishedDate: '11 Dec 2020 00:00:00 GMT', + description: 'Looking back on a deeply strange year with Jonas Renkse of Katatonia, plus the best metal songs of 2020.', + imageCaption: 'Hosted by Brad Sanders. Illustration of Jonas Renkse by Louise Pomeroy', + subtitle: '2020 In Review', + imageUrl: 'https://f4.bcbits.com/img/22817132_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22817132_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=410', + publishedDate: '08 Dec 2020 00:00:00 GMT', + description: 'Karriem Riggins and Quin Kirchner guest, plus new music by Arlo Parks, Aunty Rayzor, and Yazmin Lacey.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Karriem Riggins by Noopur Choksi.', + subtitle: 'Dance to the Drummer\'s Beat', + imageUrl: 'https://f4.bcbits.com/img/22781302_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22781302_0' }, + { type: 'show', + name: 'The Hip-Hop Show', + url: 'https://bandcamp.com/?show=409', + publishedDate: '04 Dec 2020 00:00:00 GMT', + description: 'YUNGMORPHEUS joins the show to introduce his latest project, plus appearances from Michael Sneed, Navy Blue and Nappy Nana.', + imageCaption: 'Hosted by Stoney Creation. Illustration of YOUNGMORPHEUS by McKay Felt.', + subtitle: 'The Purple Pill', + imageUrl: 'https://f4.bcbits.com/img/22717645_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22717645_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=408', + publishedDate: '01 Dec 2020 00:00:00 GMT', + description: 'Featuring soulful trio Gabriels, plus Mark Pritchard walks us through his Warp Records faves.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Gabriels by Paul Grelet.', + subtitle: 'Love and Music', + imageUrl: 'https://f4.bcbits.com/img/22645633_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22645633_0' }, + { type: 'show', + name: 'The Metal Show', + url: 'https://bandcamp.com/?show=406', + publishedDate: '27 Nov 2020 00:00:00 GMT', + description: 'Spirit Adrift’s Nate Garrett on his new album, plus new music by Pennsylvania traditional metal crew MindMaze.\n', + imageCaption: ' Hosted by Brad Sanders. Illustration of Spirit Adrift by Louise Pomeroy.', + subtitle: 'Heavy Enlightenment', + imageUrl: 'https://f4.bcbits.com/img/22594264_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22594264_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=407', + publishedDate: '24 Nov 2020 00:00:00 GMT', + description: 'Guest host Aly Gillani chats to cktrl about heartbreak, belonging and his new record \'Robyn\'.', + imageCaption: 'Hosted by Aly Gillani. Illustration of cktrl by Hsiao-Ron Cheng.', + subtitle: 'In Control', + imageUrl: 'https://f4.bcbits.com/img/22552102_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22552102_0' }, + { type: 'show', + name: 'The Hip-Hop Show', + url: 'https://bandcamp.com/?show=405', + publishedDate: '20 Nov 2020 00:00:00 GMT', + description: 'Ashia Karana guests, plus jams from across the globe by IAMDDB, Oliver Sudden, Mndsgn, Ovrkst, Queens D. Light and much more. ', + imageCaption: 'Hosted by Stoney Creation. Illustration of Ashia Karana by McKay Felt.', + subtitle: 'The 108 Karanas', + imageUrl: 'https://f4.bcbits.com/img/22503638_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22503638_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=404', + publishedDate: '17 Nov 2020 00:00:00 GMT', + description: 'Charles Webster guests, our LP of the week is by Liam Bailey, plus new jams by Kokoroko, Rob Mazurek, and Soul Renegades. ', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Charles Webster by Noopur Choksi.', + subtitle: 'The Sounds We Play', + imageUrl: 'https://f4.bcbits.com/img/22455491_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22455491_0' }, + { type: 'show', + name: 'The Metal Show', + url: 'https://bandcamp.com/?show=403', + publishedDate: '13 Nov 2020 00:00:00 GMT', + description: 'Featuring an interview with Annihilus\' Luca Cimarusti, plus the first new music by System of a Down in 15 years.', + imageCaption: ' Hosted by Brad Sanders. Illustration of Luca Cimarusti by Louise Pomeroy.', + subtitle: 'Into the Dark ', + imageUrl: 'https://f4.bcbits.com/img/22403178_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22403178_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=402', + publishedDate: '10 Nov 2020 00:00:00 GMT', + description: 'Get to know Benin\'s Star Feminine Band and hear an interview with the Sun Ra Arkestra\'s Marshall Allen and Noelle Scott. ', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Star Feminine Band by Paul Grelet.', + subtitle: 'A Better Day Is Breaking', + imageUrl: 'https://f4.bcbits.com/img/22361754_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22361754_0' }, + { type: 'show', + name: 'The Hip-Hop Show', + url: 'https://bandcamp.com/?show=401', + publishedDate: '06 Nov 2020 00:00:00 GMT', + description: 'The inaugural show features an interview with Nappy Nina, plus expansive, soulful vibes from Knxledge, Jada Imani, and more.', + imageCaption: 'Hosted by Stoney Creation. Illustration of Nappy Nina by McKay Felt.', + subtitle: 'Freak It', + imageUrl: 'https://f4.bcbits.com/img/22268132_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22268132_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=399', + publishedDate: '03 Nov 2020 00:00:00 GMT', + description: 'The Diabolical Liberties, Stephane San Juan, and Gilles Peterson guest on a 3-hour special. ', + imageCaption: 'Hosted by Andrew Jervis. The Diabolical Liberties by Hsiao-Ron Cheng', + subtitle: 'This Is Real', + imageUrl: 'https://f4.bcbits.com/img/22263735_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22263735_0' }, + { type: 'show', + name: 'The Metal Show', + url: 'https://bandcamp.com/?show=398', + publishedDate: '30 Oct 2020 00:00:00 GMT', + description: 'Featuring Matt Harvey, frontman of death metal stalwarts Exhumed and Gruesome, plus Halloween jams. ', + imageCaption: 'Hosted by Brad Sanders. Illustration of Matt Harvey by Louise Pomeroy.', + subtitle: 'Halloween Special', + imageUrl: 'https://f4.bcbits.com/img/22188534_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22188534_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=397', + publishedDate: '20 Oct 2020 00:00:00 GMT', + description: 'Guest host Aly Gillani chats to Drum\'n\'Bass pioneer Krust about his new album \'The Edge Of Everything\'', + imageCaption: 'Hosted by Aly Gillani. Illustration of Krust by Noopur Choksi.', + subtitle: 'On The Edge', + imageUrl: 'https://f4.bcbits.com/img/22073812_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/22073812_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=396', + publishedDate: '13 Oct 2020 00:00:00 GMT', + description: 'Looking for those perfect beats, Raul Monsalve mines Afro-Venezuelan sounds and Planet Battagon reaches outer space.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Raul Monsalves by Hsiao-Ron Cheng.', + subtitle: 'Bang on the Drum!', + imageUrl: 'https://f4.bcbits.com/img/21991804_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21991804_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=393', + publishedDate: '06 Oct 2020 00:00:00 GMT', + description: 'Essential debut albums by Lex Amor and The Quiet Ones, plus JISR mash Munich and Morocco on our LP of the week.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Lex Amor by Paul Grelet.', + subtitle: 'London Calling', + imageUrl: 'https://f4.bcbits.com/img/21909902_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21909902_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=392', + publishedDate: '29 Sep 2020 00:00:00 GMT', + description: 'Featuring guests Astrid Engberg and Bless The Mad, plus new Ana Frango Elétrico, Lex Amor, and Mama Odé.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Astrid Engberg by Noopur Choksi', + subtitle: 'Light in the Dark', + imageUrl: 'https://f4.bcbits.com/img/21796615_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21796615_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=391', + publishedDate: '22 Sep 2020 00:00:00 GMT', + description: 'Genre-blurring Butcher Brown and Slauson Malone guest, plus an LP of the week by the unstoppable SAULT.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Butcher Brown by Hsiao-Ron Cheng.', + subtitle: 'Music is The Message', + imageUrl: 'https://f4.bcbits.com/img/21710614_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21710614_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=389', + publishedDate: '15 Sep 2020 00:00:00 GMT', + description: 'Featuring rad Japanese trumpeter Takuya Kuroda, Houston\'s huge Free Radicals crew, and vintage gems from Mainstream Records.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Takuya Kuroda by Noopur Choksi.', + subtitle: 'The Loud Minority', + imageUrl: 'https://f4.bcbits.com/img/21630605_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21630605_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=387', + publishedDate: '01 Sep 2020 00:00:00 GMT', + description: 'A focus on fresh faces, revolutionary sounds, and new labels, plus guests Caixa Cubo and Alan Braufman.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Caixa Cubo by Paul Grelet.', + subtitle: 'Back To School Special!', + imageUrl: 'https://f4.bcbits.com/img/21443732_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21443732_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=386', + publishedDate: '25 Aug 2020 00:00:00 GMT', + description: 'Georgia Anne Muldrow chats about her new Jyoti LP and the influence of Alice Coltrane.', + imageCaption: 'Hosted by Andrew Jervis. Georgia Anne Muldrow by Hsiao-Ron Cheng.', + subtitle: 'Bending The Notes', + imageUrl: 'https://f4.bcbits.com/img/21360497_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21360497_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=384', + publishedDate: '18 Aug 2020 00:00:00 GMT', + description: 'Guest host Nubya_Garcia plays music from her debut album ‘Source’ as well as a selection of jazz, latin, soul and beyond\n\n', + imageCaption: 'Hosted by Nubya Garcia. Illustration of Nubya Garcia by Noopur Choksi.', + subtitle: 'Nubya Garcia Takeover', + imageUrl: 'https://f4.bcbits.com/img/21281484_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21281484_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=385', + publishedDate: '11 Aug 2020 00:00:00 GMT', + description: 'Guest host Aly Gillani chats to producer Tall Black Guy about his new record \'Restless As We Are\'.', + imageCaption: 'Hosted by Aly Gillani. Illustration of Tall Black Guy by Noopur Choksi.', + subtitle: 'Music For The Restless', + imageUrl: 'https://f4.bcbits.com/img/21203515_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21203515_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=383', + publishedDate: '04 Aug 2020 00:00:00 GMT', + description: 'Featuring artist, musician, and cook Duval Timothy, and soulful jazz-loving singer & producer Liv.e. ', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Timothy Duval by Hsiao-Ron Cheng.', + subtitle: 'Infinite Levels', + imageUrl: 'https://f4.bcbits.com/img/21099140_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21099140_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=382', + publishedDate: '28 Jul 2020 00:00:00 GMT', + description: 'The International Anthem crew takes over with a super-sized selection from Chicago and beyond. ', + imageCaption: 'Hosted by International Anthem. Makaya McCraven by Noopur Choksi.', + subtitle: 'International Anthem Takeover', + imageUrl: 'https://f4.bcbits.com/img/21018963_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/21018963_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=381', + publishedDate: '21 Jul 2020 00:00:00 GMT', + description: 'Featuring interviews with Kamaal Williams and Kutiman, plus an LP of the week by William Basinski\'s Sparkle Division. ', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Kamaal Williams by Hsiao-Ron Cheng.', + subtitle: 'A Day In The Life ', + imageUrl: 'https://f4.bcbits.com/img/20939611_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20939611_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=380', + publishedDate: '14 Jul 2020 00:00:00 GMT', + description: 'Plunky of Oneness of Juju and Coldcut & the Keleketla! crew talk African rhythms.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Plunky by Paul Grelet.', + subtitle: 'It Began In Africa', + imageUrl: 'https://f4.bcbits.com/img/20865273_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20865273_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=379', + publishedDate: '07 Jul 2020 00:00:00 GMT', + description: 'Guest hosts Tamar Osborn aka Collocutor and Toshio Matsuura spread the vibes from London to Tokyo.', + imageCaption: 'Hosted by Collocutor and Toshio Matsuura. Illustration by Noopur Choksi.', + subtitle: 'International Sound Clash ', + imageUrl: 'https://f4.bcbits.com/img/20785090_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20785090_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=378', + publishedDate: '30 Jun 2020 00:00:00 GMT', + description: 'Featuring guests Khruangbin and Greg Foat, plus new Sault, Minyo Crusaders, and Duval Timothy.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Khruangbin by Hsiao-Ron Cheng.', + subtitle: 'Healing Music', + imageUrl: 'https://f4.bcbits.com/img/20673047_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20673047_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=377', + publishedDate: '23 Jun 2020 00:00:00 GMT', + description: 'Photay and Skinshape guest-host featuring a tasty selection of tunes that have inspired them. ', + imageCaption: 'Hosted by Photay and Skinshape. Illustration by Paul Grelet.', + subtitle: 'Photay and Skinshape Takeover!', + imageUrl: 'https://f4.bcbits.com/img/20590416_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20590416_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=376', + publishedDate: '16 Jun 2020 00:00:00 GMT', + description: 'Guest host Aly Gillani interviews Australian vocalist Natalie Slade about her new album ‘Control’', + imageCaption: 'Hosted by Aly Gillani. Illustration of Natalie Slade by Hsiao-Ron Cheng.', + subtitle: 'Humidity', + imageUrl: 'https://f4.bcbits.com/img/20499469_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20499469_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=375', + publishedDate: '09 Jun 2020 00:00:00 GMT', + description: 'Special guest takeover hosted by Emma-Jean Thackray with Angel Bat Dawid and musical family.', + imageCaption: 'Hosted by Emma Jean Thackray. Illustration of Angel Bat Dawid by Noopur Choksi.', + subtitle: 'Space For Us', + imageUrl: 'https://f4.bcbits.com/img/20415413_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20415413_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=374', + publishedDate: '03 Jun 2020 00:00:00 GMT', + description: 'Shining a light on the crazy stories and revolutionary sounds of Analog Africa, plus NYC Trust and New Orlean\'s 79rs Gang.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Ranil by Paul Grelet.', + subtitle: 'Tryin\' Times', + imageUrl: 'https://f4.bcbits.com/img/20299138_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20299138_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=373', + publishedDate: '26 May 2020 00:00:00 GMT', + description: 'A super-sized lockdown special featuring guests Gilles Peterson, Tenderlonius, and Damu The Fudgemunk & Raw Poetic.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Shirley Scott by Hsiao-Ron Cheng.', + subtitle: 'Stories and Lessons', + imageUrl: 'https://f4.bcbits.com/img/20204953_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20204953_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=372', + publishedDate: '19 May 2020 00:00:00 GMT', + description: 'We chat with Kaitlyn Aurelia Smith and Nick Hakim and deep dive into their LPs, plus new Kassin, Gabriels, Roy Ayers, and Ola Szmidt.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Kaitlyn Aurelia Smith by Noopur Choksi.', + subtitle: 'Our Friends Electric', + imageUrl: 'https://f4.bcbits.com/img/20106017_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/20106017_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=371', + publishedDate: '12 May 2020 00:00:00 GMT', + description: 'A lockdown length episode featuring conversation and essential music with Hanni El Khatib, plus Vex Ruffin, Ian Isiah, and Ivy Sole.', + imageCaption: 'Hosted by Andrew Jervis. Illustration ofHanni El Khatib by Paul Grelet.', + subtitle: 'Alive and Kicking!', + imageUrl: 'https://f4.bcbits.com/img/19998297_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/19998297_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=370', + publishedDate: '05 May 2020 00:00:00 GMT', + description: 'Guests Dengue Dengue Dengue and Chicano Batman celebrate a decade of genre-bending music with outstanding new records.', + imageCaption: 'Host: Andrew Jervis. Illustration of Dengue Dengue Dengue by Noopur Choksi.', + subtitle: 'Revolve, Evolve . . .', + imageUrl: 'https://f4.bcbits.com/img/19888965_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/19888965_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=369', + publishedDate: '28 Apr 2020 00:00:00 GMT', + description: 'All-killer no-filler jams from around the world plus interviews with pianists/producers John Carroll Kirby and Maria Chiara Argirò.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Maria Chiara Argirò by Hsiao-Ron Cheng.', + subtitle: 'Hidden Keys', + imageUrl: 'https://f4.bcbits.com/img/19689627_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/19689627_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=368', + publishedDate: '21 Apr 2020 00:00:00 GMT', + description: 'Featuring interviews with London\'s Lunch Money Life and Melbourne\'s JK Group about music, immersion and lockdown life.\n', + imageCaption: 'Hosted by Aly Gillani and Will Evans. Illustration of Lunch Money Life by Paul Grelet.', + subtitle: 'Immersion Therapy', + imageUrl: 'https://f4.bcbits.com/img/19572166_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/19572166_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=367', + publishedDate: '14 Apr 2020 00:00:00 GMT', + description: '3-hour isolation inspiration special featuring 3 artists bubbling up during the time of the virus: Edoheart, Contour, and Matthew Tavares.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Edo Heart by Noopur Choksi.', + subtitle: 'Bubbling Up ', + imageUrl: 'https://f4.bcbits.com/img/19460258_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/19460258_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=366', + publishedDate: '31 Mar 2020 00:00:00 GMT', + description: 'Saxophone legend Gary Bartz and Rhythm Section\'s Bradley Zero guest, plus our LP of the week is by Nicolas Jaar. ', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Gary Bartz by Hsiao-Ron Cheng.', + subtitle: 'Music Is My Life', + imageUrl: 'https://f4.bcbits.com/img/19245116_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/19245116_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=365', + publishedDate: '24 Mar 2020 00:00:00 GMT', + description: 'An extra special super-sized isolation inspiration episode with guests Ricardo Richaid, Mr. Scruff, and Sam Gendel. ', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Ricardo Richaid by Noopur Choksi', + subtitle: 'Bright Moments', + imageUrl: 'https://f4.bcbits.com/img/19140778_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/19140778_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=364', + publishedDate: '17 Mar 2020 00:00:00 GMT', + description: 'Ali Shaheed Muhammed and Adrian Younge introduce their new Jazz Is Dead label featuring music recorded with their musical heroes.', + imageCaption: 'Andrew Jervis hosts. Ali Shaheed Muhammad & Adrian Younge by Paul Grelet.', + subtitle: 'We Got The Jazz', + imageUrl: 'https://f4.bcbits.com/img/18981343_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18981343_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=363', + publishedDate: '10 Mar 2020 00:00:00 GMT', + description: 'Nigel Godrich and Laura Bettinson talk about their DIY diversion as Ultraista. Plus, new Riz Ahmed, Memotone, and Wilma Archer.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Ultraísta by Noopur Choksi.', + subtitle: 'Diversions', + imageUrl: 'https://f4.bcbits.com/img/18915292_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18915292_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=362', + publishedDate: '03 Mar 2020 00:00:00 GMT', + description: 'Composer, producer, multi-instrumentalist, singer, bandleader and DJ Emma-Jean Thackray drops by with new tunes and a new label.', + imageCaption: 'Hosted by Andrew Jervis. Emma-Jean Thackray by Hsiao-Ron Cheng.', + subtitle: 'Musical Nourishment', + imageUrl: 'https://f4.bcbits.com/img/18850509_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18850509_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=361', + publishedDate: '28 Feb 2020 00:00:00 GMT', + description: 'Caribou takes us on a deep dive into his new LP, plus fresh cuts by 79rs Gang, Emicida, Angela Munoz, and Yves Tumor.', + imageCaption: 'Hosted by Andrew Jervis. Caribou by Hsiao-Ron Cheng.', + subtitle: 'Comin\' Home Baby', + imageUrl: 'https://f4.bcbits.com/img/18803441_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18803441_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=360', + publishedDate: '18 Feb 2020 00:00:00 GMT', + description: 'Featuring Oakland sounds from the Smart Bomb collective and Samplelov, plus Pharoah Sanders, Kutiman, and Nyx Nott. ', + imageCaption: 'Hosted by Andrew Jervis. W.A.L.A and Samplelov by Noopur Choksi.', + subtitle: 'Treats From City Streets', + imageUrl: 'https://f4.bcbits.com/img/18713285_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18713285_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=359', + publishedDate: '11 Feb 2020 00:00:00 GMT', + description: 'Amidst a barrage of new tunes, we look back at 20+years of Antibalas and check-in with soulful renaissance man Van Hunt.', + imageCaption: 'Hosted by Andrew Jervis. Van Hunt by Paul Grelet.', + subtitle: 'Soul Revival', + imageUrl: 'https://f4.bcbits.com/img/18647040_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18647040_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=358', + publishedDate: '04 Feb 2020 00:00:00 GMT', + description: 'The Diabolical Liberties drop a cosmic selection of spiritual backroom bangers and wonky dancefloor diversions.', + imageCaption: 'Hosted by The Diabolical Liberties. Slauson Malone by Hsiao-Ron Cheng.', + subtitle: 'Diabolical Liberties Takeover', + imageUrl: 'https://f4.bcbits.com/img/18582603_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18582603_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=357', + publishedDate: '28 Jan 2020 00:00:00 GMT', + description: 'Seu Jorge and Rogê talk about spontaneous samba, we get to know the Tara Clerkin Trio, and Flanafi drops our soulful LP of the week.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Seu Jorge and Rogê by Noopur Choksi.', + subtitle: 'In The Moment', + imageUrl: 'https://f4.bcbits.com/img/18514885_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18514885_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=356', + publishedDate: '21 Jan 2020 00:00:00 GMT', + description: 'Guitarist Jeff Parker and glitch innovator Oval stop by with their new LPs, plus Spanish producer Skygaze drops our album of the week.', + imageCaption: 'Hosted by Andrew Jervis. Jeff Parker by Hsiao-Ron Cheng.', + subtitle: 'Merging Worlds', + imageUrl: 'https://f4.bcbits.com/img/18452430_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18452430_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=355', + publishedDate: '14 Jan 2020 00:00:00 GMT', + description: 'Featuring interviews with Brownswood\'s Kassa Overall and saxophonist Muriel Grossman, plus an LP of the week by Van Hunt.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Muriel Grossmann by Noopur Choksi.', + subtitle: 'Music For Your Soul', + imageUrl: 'https://f4.bcbits.com/img/18387649_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18387649_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=354', + publishedDate: '07 Jan 2020 00:00:00 GMT', + description: 'Packed with new sounds and names for a new year, plus an interview with jazz bad boys The Hypnotic Brass Ensemble.', + imageCaption: 'Hosted by Andrew Jervis. Hypnotic Brass Ensemble by Paul Grelet.', + subtitle: 'Big Sounds For A New Year', + imageUrl: 'https://f4.bcbits.com/img/18323295_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18323295_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=353', + publishedDate: '17 Dec 2019 00:00:00 GMT', + description: 'Featuring an in-depth interview with Sampa The Great, plus an extended selection of favorite tunes from the past 12 months.', + imageCaption: 'Hosted by Andrew Jervis. Sampa The Great by Hsiao-Ron Cheng.', + subtitle: 'Best of 2019', + imageUrl: 'https://f4.bcbits.com/img/18157563_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18157563_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=352', + publishedDate: '10 Dec 2019 00:00:00 GMT', + description: 'Featuring an extended interview with Helado Negro, plus part one of our two-part dive into the best of the best sounds from 2019.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Helado Negro by Noopur Choksi.', + subtitle: 'Bandcamp Weekly Best of 2019 Part 1', + imageUrl: 'https://f4.bcbits.com/img/18094794_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18094794_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=351', + publishedDate: '03 Dec 2019 00:00:00 GMT', + description: 'Interviews with Intl. Anthem\'s Resavoir and Cassie Kinoshi of Nerija, Kokoroko, and Seed Ensemble, plus winter warmers!', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Cassie Kinoshi by Noopur Choksi.', + subtitle: 'Collaboration Nation', + imageUrl: 'https://f4.bcbits.com/img/18028014_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/18028014_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=350', + publishedDate: '19 Nov 2019 00:00:00 GMT', + description: 'Dive deep into the world of Arthur Russell with partner Tom Lee, Steve Knutson of Audika, and super fan Devendra Banhart.', + imageCaption: 'Hosted by Andrew Jervis. Arthur Russell by Hsiao-Ron Cheng.', + subtitle: 'World of Arthur', + imageUrl: 'https://f4.bcbits.com/img/17902315_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17902315_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=349', + publishedDate: '12 Nov 2019 00:00:00 GMT', + description: 'Guests include Ghanaian Alogte Oho and Max Weissenfeldt of Philophon, plus New York-based ARP. ', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Alogte Oho by Paul Grelet.', + subtitle: 'Spreading New Roots', + imageUrl: 'https://f4.bcbits.com/img/17835517_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17835517_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=348', + publishedDate: '06 Nov 2019 00:00:00 GMT', + description: 'Sudan Archives illuminates her new LP “Athena,” & has words for thieves who stole her gear; plus Free The Robots on his Filipino roots.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Sudan Archives by Paul Grelet.', + subtitle: 'Are You Experienced?', + imageUrl: 'https://f4.bcbits.com/img/17792581_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17792581_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=347', + publishedDate: '29 Oct 2019 00:00:00 GMT', + description: 'Brainfeeder\'s Teebs drops by with a new LP, plus the latest from Joy O, Daniel Maunick, Konradsen, Sean O\'Hagan, & Little Dragon.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Teebs by Noopur Choksi.', + subtitle: 'Deeply Curious', + imageUrl: 'https://f4.bcbits.com/img/17718326_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17718326_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=346', + publishedDate: '22 Oct 2019 00:00:00 GMT', + description: 'Floating Points and Tawiah are guests, plus new gems by Osunlade, 30/70 Collective, Homeboy Sandman, & Junius Paul.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Floating Points by Noopur Choksi.', + subtitle: 'New Territory', + imageUrl: 'https://f4.bcbits.com/img/17657227_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17657227_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=345', + publishedDate: '15 Oct 2019 00:00:00 GMT', + description: 'French producer Neue Grafik drops by to discuss community, collaboration and his new ensemble record Foulden Road.', + imageCaption: 'Hosted by Aly Gillani. Illustration of Neue Grafik by Paul Grelet.', + subtitle: 'Make Some Space', + imageUrl: 'https://f4.bcbits.com/img/17598302_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17598302_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=344', + publishedDate: '08 Oct 2019 00:00:00 GMT', + description: 'Sublime German/Kenyan duo Odd Okoddo and Chicago\'s Jaimie Branch guest, plus new Arp, Henry Wu, and Rhi.', + imageCaption: 'Hosted by Andrew Jervis. Olith Ratego of ODD OKODDO by Hsiao-Ron Cheng.', + subtitle: 'Vibes From The Tribe', + imageUrl: 'https://f4.bcbits.com/img/17540394_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17540394_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=343', + publishedDate: '01 Oct 2019 00:00:00 GMT', + description: 'Multitalented Corey King guests, Dengue Dengue Dengue drop our LP of the week, plus new Afriqua, SAULT, and DJ Oil.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Corey King by Noopur Choksi.', + subtitle: 'Feels So Good', + imageUrl: 'https://f4.bcbits.com/img/17481561_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17481561_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=342', + publishedDate: '24 Sep 2019 00:00:00 GMT', + description: 'Yazz Ahmed guests and we feature "The Music of" project, plus SAULT, Brittany Howard, Teebs, Blackpocket, and Jungle. ', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Yazz Ahmed by Paul Grelet.', + subtitle: 'Praise Due', + imageUrl: 'https://f4.bcbits.com/img/17423423_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17423423_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=341', + publishedDate: '17 Sep 2019 00:00:00 GMT', + description: 'Mark de Clive-Lowe talks about Ronin Arkestra and picks some Japanese gems, plus Sampa The Great drops our LP of the week.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Mark de Clive-Lowe by Paul Grelet.', + subtitle: 'Music is Freedom', + imageUrl: 'https://f4.bcbits.com/img/17366441_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17366441_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=340', + publishedDate: '10 Sep 2019 00:00:00 GMT', + description: 'Take a deep dive into the buzzing South African music scene with Sio, Esa, Spaza, Yugen Blakrok, Africa Express, & BCUC.', + imageCaption: 'Hosted by Andrew Jervis. Esa, Sio & Nosisi Ngakane, by Paul Grelet.', + subtitle: 'South Africa Special', + imageUrl: 'https://f4.bcbits.com/img/17306591_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17306591_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=339', + publishedDate: '03 Sep 2019 00:00:00 GMT', + description: 'New music from Tawiah, Four Tet, and Sudan Archives, plus 3 legendary guests: Kirk Degiorgio, Paul Murphy, and IG Culture.', + imageCaption: 'Hosted by Andrew Jervis. Kirk Degiorgio by Hsiao-Ron Cheng.', + subtitle: 'Legends!', + imageUrl: 'https://f4.bcbits.com/img/17249164_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17249164_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=338', + publishedDate: '27 Aug 2019 00:00:00 GMT', + description: 'Nat Birchall on jazz and Jamaica, plus Run Child Run drops by, and our LP of the week is by Tenesha The Wordsmith. ', + imageCaption: 'Hosted by Andrew Jervis. Nat Birchall by Hsiao-Ron Cheng.', + subtitle: 'Sounds Almighty', + imageUrl: 'https://f4.bcbits.com/img/17191765_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17191765_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=337', + publishedDate: '13 Aug 2019 00:00:00 GMT', + description: 'A. Billi Free talks about her new LP and juggling singing, rapping and producing, plus our album of the week is by Luedji Luna.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of A. Billi Free by Noopur Choksi.', + subtitle: 'Time to Flourish', + imageUrl: 'https://f4.bcbits.com/img/17082428_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17082428_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=336', + publishedDate: '06 Aug 2019 00:00:00 GMT', + description: 'UK singer Bryony Jarman-Pinto talks about her debut LP on Tru Thoughts, and Rejoicer of Raw Tapes brings the heat from Tel Aviv.', + imageCaption: 'Hosted by Andrew Jervis. Bryony Jarman-Pinto by Hsiao-Ron Cheng.', + subtitle: 'All Notes Are Friends', + imageUrl: 'https://f4.bcbits.com/img/17026742_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/17026742_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=335', + publishedDate: '30 Jul 2019 00:00:00 GMT', + description: 'Rio Kai of Nerija and Mercury Prize-nominated The Seed Ensemble guests, plus new Shigeto, Yazz Ahmed, Abro, and Pat Thomas.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of NÉRIJA by Noopur Choksi.', + subtitle: 'The Music Comes First', + imageUrl: 'https://f4.bcbits.com/img/16972629_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16972629_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=334', + publishedDate: '23 Jul 2019 00:00:00 GMT', + description: 'Ash Walker wades into unchartered territory on his sunny LP, plus heavyweight tunes by Four Tet, Floating Points, and Waajeed.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Ash Walker by Paul Grelet', + subtitle: 'Deeper Than Deep', + imageUrl: 'https://f4.bcbits.com/img/16917940_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16917940_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=333', + publishedDate: '16 Jul 2019 00:00:00 GMT', + description: 'Kit Sebastian talk about blending Anatolian psychedelia with Brazilian Tropicalia, plus new 30/70, Sampa the Great, and Daymé Arocena.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Kit Sebastian by Hsiao-Ron Cheng.', + subtitle: 'Mantra Moderne', + imageUrl: 'https://f4.bcbits.com/img/16856159_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16856159_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=332', + publishedDate: '09 Jul 2019 00:00:00 GMT', + description: 'Quantic drops by to chat about his new album ‘Atlantic Oscillations’ and Black Pumas discuss Austin and their collaborative process. ', + imageCaption: 'Hosted by Aly Gillani. Illustration of Quantic by Oliver Barrett.', + subtitle: 'Atlantic Progressions', + imageUrl: 'https://f4.bcbits.com/img/16808867_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16808867_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=331', + publishedDate: '03 Jul 2019 00:00:00 GMT', + description: 'Guest host Ennio Styles talks to Mike Calandra about his label dedicated to nurturing and contemporary African scenes. ', + imageCaption: 'Hosted by Ennio Styles. Illustration of Mike Calandra by Hsiao-Ron Cheng.', + subtitle: 'The Spirit Of Young Africa', + imageUrl: 'https://f4.bcbits.com/img/16764314_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16764314_0' }, + { type: 'show', + name: 'From London To Detroit', + url: 'https://bandcamp.com/?show=330', + publishedDate: '26 Jun 2019 00:00:00 GMT', + description: 'Guest host Marc Mac takes us on a soulful journey to the electronic side of Detroit. Classics from Gerald Mitchell, Waajeed, Art Of Tones and more.', + imageCaption: 'Hosted by Marc Mac. Illustration of Gerald Mitchell by Oliver Barrett.', + subtitle: 'Guest host Marc Mac takes us on a soulful trip to Detroit', + imageUrl: 'https://f4.bcbits.com/img/16710335_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16710335_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=329', + publishedDate: '12 Jun 2019 00:00:00 GMT', + description: 'Ryan Porter is a ‘Force For Good’ and Oakland’s Tenesha The Wordsmith chats about her LP made with Khalab. ', + imageCaption: 'Hosted by Aly Gillani. Illustration of Tenesha The WordSmith by Paul Grelet', + subtitle: 'Back At It', + imageUrl: 'https://f4.bcbits.com/img/16594732_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16594732_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=328', + publishedDate: '04 Jun 2019 00:00:00 GMT', + description: 'Sao Paolo\'s Sessa talks about his love letter LP to Brazil, and Oakland-based Brijean drops in with a sunny backroom disco debut. ', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Brijean by Hsiao-Ron Cheng.', + subtitle: 'Home Cookin\'', + imageUrl: 'https://f4.bcbits.com/img/16525408_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16525408_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=327', + publishedDate: '28 May 2019 00:00:00 GMT', + description: 'Guests NY-based harpist Brandee Younger and Brownswood Recording’s Skinny Pelembe make music between the lines.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Brandee Younger by Hsiao-Ron Cheng.', + subtitle: 'Between The Lines', + imageUrl: 'https://f4.bcbits.com/img/16465283_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16465283_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=326', + publishedDate: '14 May 2019 00:00:00 GMT', + description: 'Take a trip to Chicago with guests Jamila Woods, Damon Locks, and Kahil El’Zabar of the Ethnic Heritage Ensemble.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Jamila Woods by Paul Grelet', + subtitle: 'Chicago Legacy', + imageUrl: 'https://f4.bcbits.com/img/16353761_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16353761_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=325', + publishedDate: '07 May 2019 00:00:00 GMT', + description: 'Guests include the exotic eccentric Laneous from Melbourne and Helsinki-based stone cold soul man Bobby Oroza.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Laneous by Hsiao-Ron Cheng.', + subtitle: 'Soul Fantastica', + imageUrl: 'https://f4.bcbits.com/img/16290604_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16290604_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=324', + publishedDate: '30 Apr 2019 00:00:00 GMT', + description: 'New music by Ezra Collective, Mauskovic Dance Band, Nathan Bajar, Kindness, and Quantic. Plus 14KT guests with a killer debut LP.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of 14KT by Paul Grelet', + subtitle: 'Be Free', + imageUrl: 'https://f4.bcbits.com/img/16227037_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16227037_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=323', + publishedDate: '23 Apr 2019 00:00:00 GMT', + description: 'Claude Fontaine teams up with bossa and dub legends, and Kelly Finnigan, of the Monophonics, drops a hard-hitting soul LP.\n\n', + imageCaption: 'Host: Andrew Jervis. Illustration of Claude Fontaine by Paul Grelet', + subtitle: 'Tracks of My Tears', + imageUrl: 'https://f4.bcbits.com/img/16168417_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16168417_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=322', + publishedDate: '16 Apr 2019 00:00:00 GMT', + description: 'Guests include psyche-meets-soul duo Adrian Younge and Jack Waterson, plus riotous Orchestra Gold from Oakland via Mali.', + imageCaption: 'Hosted by Andrew Jervis. Adrian Younge & Jack Waterson by Hsiao-Ron Cheng.', + subtitle: 'Black, White, and Gold.', + imageUrl: 'https://f4.bcbits.com/img/16110158_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/16110158_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=321', + publishedDate: '02 Apr 2019 00:00:00 GMT', + description: 'Featuring new music by Kutiman, Da Lata, Quelle Chris, Mdou Moctar, & Adrian Sherwood, plus guests Ian Simmonds & Paper Tiger.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Paper Tiger by Noopur Choksi.', + subtitle: 'Paths of Most Resistance', + imageUrl: 'https://f4.bcbits.com/img/15989091_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/15989091_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=320', + publishedDate: '26 Mar 2019 00:00:00 GMT', + description: 'Super soulful Shafiq Husayn and Hiatus Kaiyote\'s Clever Austin are guests, plus our LP of the week is by Christian Scott.', + imageCaption: 'Hosted by Andrew Jervis. Illustration of Clever Austin by Niklas Åkerblad.', + subtitle: 'Infinite Loops', + imageUrl: 'https://f4.bcbits.com/img/15926660_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/15926660_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=319', + publishedDate: '19 Mar 2019 00:00:00 GMT', + description: 'Guest host Aly Gillani chats to Sarah Tandy about role models, classical music and her new album ‘Infection In The Sentence’.', + imageCaption: 'Hosted by Aly Gillani. Illustration of Sarah Tandy by Noopur Choksi.', + subtitle: 'Music Is The Language', + imageUrl: 'https://f4.bcbits.com/img/15866468_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/15866468_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=318', + publishedDate: '12 Mar 2019 00:00:00 GMT', + description: 'Guests Dexter Story and Kokoroko pay respect to the past while forging new ground. Our LP of the week is by Helado Negro.', + imageCaption: 'Host: Andrew Jervis. KOKOROKO illustrated by Paul Grelet', + subtitle: 'Tunes Without Frontiers', + imageUrl: 'https://f4.bcbits.com/img/15805199_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/15805199_0' }, + { type: 'show', + name: 'Bandcamp Weekly', + url: 'https://bandcamp.com/?show=317', + publishedDate: '05 Mar 2019 00:00:00 GMT', + description: 'BC Weekly #300 features guests Durand Jones & the Indications and Yves Jarvis, plus an LP of the week compiled by Devendra Banhart.', + imageCaption: 'Hosted by Andrew Jervis. Dominique Fils-Aimé by Niklas Åkerblad.', + subtitle: 'Long Way Home', + imageUrl: 'https://f4.bcbits.com/img/15738059_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/15738059_0' }, + ... 299 more items ] diff --git a/examples/getShow.js b/examples/getShow.js new file mode 100644 index 0000000..d2d5271 --- /dev/null +++ b/examples/getShow.js @@ -0,0 +1,8 @@ +const bcfetch = require('../'); +const util = require('util'); + +const showUrl = 'https://bandcamp.com/?show=421'; + +bcfetch.getShow(showUrl).then( results => { + console.log(util.inspect(results, false, null, false)); +}); \ No newline at end of file diff --git a/examples/getShow_output.txt b/examples/getShow_output.txt new file mode 100644 index 0000000..cb69cbc --- /dev/null +++ b/examples/getShow_output.txt @@ -0,0 +1,343 @@ +{ type: 'show', + name: 'The Hip-Hop Show', + url: 'https://bandcamp.com/?show=421', + publishedDate: '29 Jan 2021 00:00:00 GMT', + description: 'Ovrkast joins the show to discuss his latest album, Try Again. Plus sounds from Potatohead People, Isaiah Mclane, and Boom Baptist.', + shortDescription: 'Ovrkast discusses his latest album, Try Again, plus appearances from Boom Baptist and Isaiah Mclane', + imageCaption: 'Hosted by Stoney Creation. Illustration of Ovrkast by McKay Felt', + subtitle: '55 Degree Weather', + duration: 5133.84, + imageUrl: 'https://f4.bcbits.com/img/23443998_25.jpg', + screenImageUrl: 'https://f4.bcbits.com/img/23443998_0', + streamUrl: + { 'mp3-128': 'https://bandcamp.com/stream_redirect?enc=mp3-128&track_id=1825658732&ts=1612344071&t=3519bac963c491fb5b82d1f4cded8e47e823a0f4', + 'opus-lo': 'https://popplers5.bandcamp.com/download/track?enc=opus-lo&fsig=bf3e5993296f366af3cf4ad5e7a67492&id=1825658732&stream=1&ts=1612344072.0' }, + tracks: + [ { name: 'time to go', + url: 'https://eighty9s.bandcamp.com/track/time-to-go', + imageUrl: 'https://f4.bcbits.com/img/a1082190285_9.jpg', + seekPosition: 0, + artist: + { name: 'eighty9s', + url: 'https://eighty9s.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/19154098_21.jpg', + location: 'San Francisco, California' }, + album: + { name: 'Past Time', + url: 'https://eighty9s.bandcamp.com/album/past-time' } }, + { name: 'What It Feels Like (feat. T3, Illa J & Kapok)', + url: 'https://potatoheadpeople.bandcamp.com/track/what-it-feels-like-feat-t3-illa-j-kapok-2', + imageUrl: 'https://f4.bcbits.com/img/a56254833_9.jpg', + seekPosition: 106, + artist: + { name: 'Potatohead People', + url: 'https://potatoheadpeople.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/21755415_21.jpg', + location: 'Vancouver, British Columbia' }, + album: + { name: 'Mellow Fantasy', + url: 'https://potatoheadpeople.bandcamp.com/album/mellow-fantasy' } }, + { name: 'Translate It ft. B-Money', + url: 'https://juggaknots.bandcamp.com/track/translate-it-ft-b-money', + imageUrl: 'https://f4.bcbits.com/img/a2530516806_9.jpg', + seekPosition: 313, + artist: + { name: 'Breeze Brewin, Juggaknots', + url: 'https://juggaknots.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/14673280_21.jpg', + location: 'New York, New York' }, + album: + { name: 'Breeze Brewin, Juggaknots - Hindsight', + url: 'https://juggaknots.bandcamp.com/album/breeze-brewin-juggaknots-hindsight' } }, + { name: 'FistfulofGreens', + url: 'https://yungmorpheus.bandcamp.com/track/fistfulofgreens', + imageUrl: 'https://f4.bcbits.com/img/a122830275_9.jpg', + seekPosition: 460, + artist: + { name: 'YUNGMORPHEUS & ewonee', + url: 'https://yungmorpheus.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/23396531_21.jpg', + location: 'Los Angeles, California' }, + album: + { name: 'Thumbing Thru Foliage', + url: 'https://yungmorpheus.bandcamp.com/album/thumbing-thru-foliage' } }, + { name: 'When I\'m Gone', + url: 'https://aaronxfairchild.bandcamp.com/track/when-im-gone', + imageUrl: 'https://f4.bcbits.com/img/a1569522923_9.jpg', + seekPosition: 575, + artist: + { name: 'Aaron Fairchild', + url: 'https://aaronxfairchild.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/21577269_21.jpg', + location: 'Portland, Oregon' }, + album: + { name: 'The Sun Comes Through', + url: 'https://aaronxfairchild.bandcamp.com/album/the-sun-comes-through' } }, + { name: 'U callin\' Me (ft. pink siifu & akeema-zane) [prod. swarvy]', + url: 'https://lojii.bandcamp.com/track/u-callin-me-ft-pink-siifu-akeema-zane-prod-swarvy', + imageUrl: 'https://f4.bcbits.com/img/a23158227_9.jpg', + seekPosition: 780, + artist: + { name: 'lojii', + url: 'https://lojii.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/22800934_21.jpg', + location: 'Philadelphia, Pennsylvania' }, + album: + { name: 'lo&behold', + url: 'https://lojii.bandcamp.com/album/lo-behold-2' } }, + { name: 'Wings', + url: 'https://isaiahmclane.bandcamp.com/track/wings', + imageUrl: 'https://f4.bcbits.com/img/a3987916765_9.jpg', + seekPosition: 955, + artist: + { name: 'Isaiah McLane', + url: 'https://isaiahmclane.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/23480099_21.jpg', + location: 'Berkeley, California' }, + album: + { name: '37 Week Challenge', + url: 'https://isaiahmclane.bandcamp.com/album/37-week-challenge' } }, + { name: 'Press Play', + url: 'https://ashiakarana.bandcamp.com/track/press-play', + imageUrl: 'https://f4.bcbits.com/img/a2001339741_9.jpg', + seekPosition: 1123, + artist: + { name: 'Ashia Karana', + url: 'https://ashiakarana.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/21083350_21.jpg', + location: 'Atlanta, Georgia' }, + album: null }, + { name: '8thstrike_', + url: 'https://knxwledge.bandcamp.com/track/8thstrike', + imageUrl: 'https://f4.bcbits.com/img/a1776099330_9.jpg', + seekPosition: 1342, + artist: + { name: 'Knxwledge.', + url: 'https://knxwledge.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/20991183_21.jpg', + location: 'Los Angeles, California' }, + album: + { name: 'VGM\'s​​​.​​​PRT.8_', + url: 'https://knxwledge.bandcamp.com/album/vgms-prt-8' } }, + { name: 'Henny Bottles', + url: 'https://shawcalhoune.bandcamp.com/track/henny-bottles', + imageUrl: 'https://f4.bcbits.com/img/a3592642307_9.jpg', + seekPosition: 1538, + artist: + { name: 'Shaw Calhoune', + url: 'https://shawcalhoune.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/22975182_21.jpg', + location: 'Maryland' }, + album: + { name: 'The Rudy Tape', + url: 'https://shawcalhoune.bandcamp.com/album/the-rudy-tape' } }, + { name: '3 WAY PHONE CALL (feat. 3WAYSLIM, BIG KAHUNA OG, MONDAY NIGHT)', + url: 'https://schemeteamallstars.bandcamp.com/track/3-way-phone-call-feat-3wayslim-big-kahuna-og-monday-night', + imageUrl: 'https://f4.bcbits.com/img/a309077249_9.jpg', + seekPosition: 1628, + artist: + { name: 'BIG KAHUNA OG & MONDAY NIGHT', + url: 'https://schemeteamallstars.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/13872878_21.jpg', + location: 'Richmond, Virginia' }, + album: + { name: 'SHARK REPORT', + url: 'https://schemeteamallstars.bandcamp.com/album/shark-report' } }, + { name: 'Loonng Time Coming', + url: 'https://culturepower45.bandcamp.com/track/loonng-time-coming', + imageUrl: 'https://f4.bcbits.com/img/a3904534507_9.jpg', + seekPosition: 1833, + artist: + { name: 'Primeridian x Rashid Hadee', + url: 'https://culturepower45.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/16005517_21.jpg', + location: 'Chicago, Illinois' }, + album: + { name: 'Prime Diesel', + url: 'https://culturepower45.bandcamp.com/album/prime-diesel' } }, + { name: 'Toucan Wing', + url: 'https://boombaptist.bandcamp.com/track/toucan-wing', + imageUrl: 'https://f4.bcbits.com/img/a3906030308_9.jpg', + seekPosition: 2047, + artist: + { name: 'BoomBaptist', + url: 'https://boombaptist.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/23197928_21.jpg', + location: 'Austin' }, + album: + { name: 'Komfort Food', + url: 'https://boombaptist.bandcamp.com/album/komfort-food' } }, + { name: 'A Distant Night', + url: 'https://atelier71.bandcamp.com/track/a-distant-night-2', + imageUrl: 'https://f4.bcbits.com/img/a2599977834_9.jpg', + seekPosition: 2262, + artist: + { name: 'Arya', + url: 'https://atelier71.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/19571878_21.jpg', + location: 'Milan, Italy' }, + album: + { name: 'Peace Of Mind', + url: 'https://atelier71.bandcamp.com/album/peace-of-mind' } }, + { name: 'Awards (Intro) feat. Noah Archangel', + url: 'https://bohup.bandcamp.com/track/awards-intro-feat-noah-archangel', + imageUrl: 'https://f4.bcbits.com/img/a3760799760_9.jpg', + seekPosition: 2440, + artist: + { name: 'The Band of the Hawk & Yeaux Majesty', + url: 'https://bohup.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/20980289_21.jpg', + location: 'Houston, Texas' }, + album: + { name: 'Memorabilia', + url: 'https://bohup.bandcamp.com/album/memorabilia' } }, + { name: 'AllPraise', + url: 'https://itsovrkast.bandcamp.com/track/allpraise', + imageUrl: 'https://f4.bcbits.com/img/a4154433266_9.jpg', + seekPosition: 2601, + artist: + { name: 'ovrkast.', + url: 'https://itsovrkast.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/19079138_21.jpg', + location: 'Oakland, California' }, + album: + { name: 'Try Again', + url: 'https://itsovrkast.bandcamp.com/album/try-again' } }, + { name: 'Face Ft. Navy Blue', + url: 'https://itsovrkast.bandcamp.com/track/face-ft-navy-blue', + imageUrl: 'https://f4.bcbits.com/img/a4154433266_9.jpg', + seekPosition: 2856, + artist: + { name: 'ovrkast.', + url: 'https://itsovrkast.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/19079138_21.jpg', + location: 'Oakland, California' }, + album: + { name: 'Try Again', + url: 'https://itsovrkast.bandcamp.com/album/try-again' } }, + { name: 'Church Ft. Demahjiae', + url: 'https://itsovrkast.bandcamp.com/track/church-ft-demahjiae', + imageUrl: 'https://f4.bcbits.com/img/a4154433266_9.jpg', + seekPosition: 3210, + artist: + { name: 'ovrkast.', + url: 'https://itsovrkast.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/19079138_21.jpg', + location: 'Oakland, California' }, + album: + { name: 'Try Again', + url: 'https://itsovrkast.bandcamp.com/album/try-again' } }, + { name: 'Try Again', + url: 'https://itsovrkast.bandcamp.com/track/try-again', + imageUrl: 'https://f4.bcbits.com/img/a4154433266_9.jpg', + seekPosition: 3498, + artist: + { name: 'ovrkast.', + url: 'https://itsovrkast.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/19079138_21.jpg', + location: 'Oakland, California' }, + album: + { name: 'Try Again', + url: 'https://itsovrkast.bandcamp.com/album/try-again' } }, + { name: 'Outro (its time)', + url: 'https://itsovrkast.bandcamp.com/track/outro-its-time', + imageUrl: 'https://f4.bcbits.com/img/a4154433266_9.jpg', + seekPosition: 3788, + artist: + { name: 'ovrkast.', + url: 'https://itsovrkast.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/19079138_21.jpg', + location: 'Oakland, California' }, + album: + { name: 'Try Again', + url: 'https://itsovrkast.bandcamp.com/album/try-again' } }, + { name: 'The Intro(vert)', + url: 'https://jyps.bandcamp.com/track/the-intro-vert', + imageUrl: 'https://f4.bcbits.com/img/a1841901895_9.jpg', + seekPosition: 4060, + artist: + { name: 'Jypsy', + url: 'https://jyps.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/23396305_21.jpg', + location: 'Inkster, Michigan' }, + album: + { name: 'Born Wit It', + url: 'https://jyps.bandcamp.com/album/born-wit-it' } }, + { name: 'swordfish', + url: 'https://jdreid.bandcamp.com/track/swordfish', + imageUrl: 'https://f4.bcbits.com/img/a3603942056_9.jpg', + seekPosition: 4190, + artist: + { name: 'JD. Reid', + url: 'https://jdreid.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/22245447_21.jpg', + location: 'London, UK' }, + album: + { name: 'North West\'s Finest', + url: 'https://jdreid.bandcamp.com/album/north-wests-finest' } }, + { name: 'high rise in newark', + url: 'https://afrolab9000.bandcamp.com/track/high-rise-in-newark', + imageUrl: 'https://f4.bcbits.com/img/a738960096_9.jpg', + seekPosition: 4286, + artist: + { name: 'R.A.P. Ferreira', + url: 'https://afrolab9000.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/4451843_21.jpg', + location: 'Nashville, Tennessee' }, + album: + { name: 'bob\'s son: R.A.P. Ferreira in the garden level cafe of the scallops hotel', + url: 'https://afrolab9000.bandcamp.com/album/bobs-son-r-a-p-ferreira-in-the-garden-level-cafe-of-the-scallops-hotel' } }, + { name: 'Volvo', + url: 'https://zekeultra.bandcamp.com/track/volvo-2', + imageUrl: 'https://f4.bcbits.com/img/a3185032099_9.jpg', + seekPosition: 4407, + artist: + { name: 'ZekeUltra', + url: 'https://zekeultra.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/15204938_21.jpg', + location: 'Delaware' }, + album: + { name: 'From Time', + url: 'https://zekeultra.bandcamp.com/album/from-time' } }, + { name: 'if you slide', + url: 'https://baghead1.bandcamp.com/track/if-you-slide', + imageUrl: 'https://f4.bcbits.com/img/a1167110350_9.jpg', + seekPosition: 4532, + artist: + { name: 'Baghead', + url: 'https://baghead1.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/13162500_21.jpg', + location: 'California' }, + album: null }, + { name: 'Out The Window', + url: 'https://lovillage.bandcamp.com/track/out-the-window', + imageUrl: 'https://f4.bcbits.com/img/a2948500240_9.jpg', + seekPosition: 4613, + artist: + { name: 'Lo Village', + url: 'https://lovillage.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/21829714_21.jpg', + location: 'Maryland' }, + album: null }, + { name: 'PROTECT feat Jack Stephenson Oliver', + url: 'https://morriarchi.bandcamp.com/track/protect-feat-jack-stephenson-oliver', + imageUrl: 'https://f4.bcbits.com/img/a2544455082_9.jpg', + seekPosition: 4841, + artist: + { name: 'Morriarchi', + url: 'https://morriarchi.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/6940676_21.jpg', + location: 'London, UK' }, + album: + { name: 'Geography of Peace', + url: 'https://morriarchi.bandcamp.com/album/geography-of-peace' } }, + { name: 'Constellations (feat. King Isis)', + url: 'https://stari.bandcamp.com/track/constellations-feat-king-isis', + imageUrl: 'https://f4.bcbits.com/img/a3631955375_9.jpg', + seekPosition: 4977, + artist: + { name: 'Stari', + url: 'https://stari.bandcamp.com', + imageUrl: 'https://f4.bcbits.com/img/22116052_21.jpg', + location: 'Oakland, California' }, + album: null } ] } diff --git a/lib/index.js b/lib/index.js index 91de73c..5583e6b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -236,6 +236,29 @@ async function getTags() { .then( html => parser.parseTags(html) ); } +async function getAllShows(options = {}) { + const imageConstants = await _getImageConstants(); + const opts = { + imageBaseUrl: imageConstants.baseUrl, + showImageFormat: await _parseImageFormatArg(options.showImageFormat, 25) + }; + return _fetchPage(utils.getAllShowsUrl(), true) + .then( json => parser.parseAllShows(json, opts) ); +} + +async function getShow(showUrl, options = {}) { + const imageConstants = await _getImageConstants(); + const opts = { + showUrl, + imageBaseUrl: imageConstants.baseUrl, + albumImageFormat: await _parseImageFormatArg(options.albumImageFormat, 9), + artistImageFormat: await _parseImageFormatArg(options.artistImageFormat, 21), + showImageFormat: await _parseImageFormatArg(options.showImageFormat, 25) + }; + return _fetchPage(showUrl) + .then( html => parser.parseShow(html, opts) ); +} + async function _fetchPage(url, json = false) { return _cache.getOrSet('page', url + (json ? ':json' : ':html'), () => { return fetch(url).then( res => json ? res.json() : res.text() ); @@ -265,5 +288,7 @@ module.exports = { search, getAlbumHighlightsByTag, getTags, - cache + cache, + getAllShows, + getShow, }; \ No newline at end of file diff --git a/lib/parser.js b/lib/parser.js index 028bdb4..98e1812 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -631,6 +631,77 @@ function parseTags(html) { }; } +function parseAllShows(json, opts) { + const shows = []; + if (typeof json === 'object' && Array.isArray(json.results)) { + json.results.forEach( show => { + shows.push({ + type: 'show', + name: show.title, + url: utils.getShowUrl(show.id), + publishedDate: show.published_date, + description: show.desc, + imageCaption: show.image_caption, + subtitle: show.subtitle, + imageUrl: opts.imageBaseUrl + '/img/' + show.v2_image_id + '_' + opts.showImageFormat.id + '.jpg', + screenImageUrl: opts.imageBaseUrl + '/img/' + show.v2_image_id + '_0' + }) + }) + } + return shows; +} + +function parseShow(html, opts) { + const $ = cheerio.load(html); + const blob = decode($('#pagedata[data-blob]').attr('data-blob')); + const parsed = JSON.parse(blob); + + if (typeof parsed === 'object' && parsed.bcw_data) { + const showInfo = parsed.bcw_data[utils.getShowIdFromUrl(opts.showUrl)]; + if (showInfo) { + const show = { + type: 'show', + name: showInfo.title, + url: utils.getShowUrl(showInfo.show_id), + publishedDate: showInfo.published_date, + description: showInfo.desc, + shortDescription: showInfo.short_desc, + imageCaption: showInfo.image_caption, + subtitle: showInfo.subtitle, + duration: showInfo.audio_duration, + imageUrl: opts.imageBaseUrl + '/img/' + showInfo.show_v2_image_id + '_' + opts.showImageFormat.id + '.jpg', + screenImageUrl: opts.imageBaseUrl + '/img/' + showInfo.show_v2_image_id + '_0', + streamUrl: showInfo.audio_stream, + tracks: [] + } + showInfo.tracks.forEach( track => { + const trackItem = { + name: track.title, + url: track.track_url, + imageUrl: opts.imageBaseUrl + '/img/a' + track.track_art_id + '_' + opts.albumImageFormat.id + '.jpg', + seekPosition: track.timecode, + artist: { + name: track.artist, + url: 'https://' + track.url_hints.subdomain + '.bandcamp.com', + imageUrl: opts.imageBaseUrl + '/img/' + track.bio_image_id + '_' + opts.artistImageFormat.id + '.jpg', + location: track.location_text + }, + album: null + }; + if (track.album_title) { + trackItem.album = { + name: track.album_title, + url: track.album_url + } + } + show.tracks.push(trackItem); + }); + return show; + } + } + return null; +} + module.exports = { parseDiscoverResults, parseDiscoverOptions, @@ -642,5 +713,7 @@ module.exports = { parseLabelArtists, parseSearchResults, parseAlbumHighlightsByTag, - parseTags + parseTags, + parseAllShows, + parseShow, }; \ No newline at end of file diff --git a/lib/utils.js b/lib/utils.js index 02e5471..1b9e7ab 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -114,6 +114,24 @@ function isAbsoluteUrl(url) { return isAbsolute.test(url); } +function getAllShowsUrl() { + return getSiteUrl() + '/api/bcweekly/3/list'; +} + +function getShowIdFromUrl(showUrl) { + const _url = splitUrl(showUrl); + let qs = _url.query; + if (qs.startsWith('?')) { + qs = qs.substr(1); + } + const pqs = querystring.parse(qs); + return pqs && pqs.show ? pqs.show : null; +} + +function getShowUrl(showId) { + return getSiteUrl() + '/?show=' + showId; +} + module.exports = { getUrl, getSiteUrl, @@ -127,5 +145,8 @@ module.exports = { splitUrl, getSearchUrl, stripMultipleWhitespaces, - isAbsoluteUrl + isAbsoluteUrl, + getAllShowsUrl, + getShowIdFromUrl, + getShowUrl }; \ No newline at end of file