@@ -4,7 +4,7 @@ const htmlParser = require('./htmlParser.js')
44const utils = require ( './utils.js' )
55
66const checkNotFound = function ( html ) {
7- return ( html . includes ( " Sorry, that something isn’t here." ) || html . includes ( '<meta property="og:url" content="https://bandcamp.com/">' ) ) ;
7+ return ( html . includes ( ' Sorry, that something isn’t here.' ) || html . includes ( '<meta property="og:url" content="https://bandcamp.com/">' ) )
88}
99
1010exports . search = function ( params , cb ) {
@@ -13,7 +13,7 @@ exports.search = function (params, cb) {
1313 if ( error ) {
1414 cb ( error , null )
1515 } else {
16- if ( checkNotFound ( html ) ) return cb ( " 404" , null ) ;
16+ if ( checkNotFound ( html ) ) return cb ( ' 404' , null )
1717 const searchResults = htmlParser . parseSearchResults ( html )
1818 cb ( null , searchResults )
1919 }
@@ -26,7 +26,7 @@ exports.getAlbumsWithTag = function (params, cb) {
2626 if ( error ) {
2727 cb ( error , null )
2828 } else {
29- if ( checkNotFound ( html ) ) return cb ( " 404" , null ) ;
29+ if ( checkNotFound ( html ) ) return cb ( ' 404' , null )
3030 const tagResults = htmlParser . parseTagResults ( html )
3131 cb ( null , tagResults )
3232 }
@@ -39,7 +39,7 @@ exports.getAlbumUrls = function (artistUrl, cb) {
3939 if ( error ) {
4040 cb ( error , null )
4141 } else {
42- if ( checkNotFound ( html ) ) return cb ( " 404" , null ) ;
42+ if ( checkNotFound ( html ) ) return cb ( ' 404' , null )
4343 const albumUrls = htmlParser . parseAlbumUrls ( html , artistUrl )
4444 cb ( null , albumUrls )
4545 }
@@ -51,7 +51,7 @@ exports.getAlbumInfo = function (albumUrl, cb) {
5151 if ( error ) {
5252 cb ( error , null )
5353 } else {
54- if ( checkNotFound ( html ) ) return cb ( " 404" , null ) ;
54+ if ( checkNotFound ( html ) ) return cb ( ' 404' , null )
5555 const albumInfo = htmlParser . parseAlbumInfo ( html , albumUrl )
5656 cb ( null , albumInfo )
5757 }
@@ -63,7 +63,7 @@ exports.getAlbumProducts = function (albumUrl, cb) {
6363 if ( error ) {
6464 cb ( error , null )
6565 } else {
66- if ( checkNotFound ( html ) ) return cb ( " 404" , null ) ;
66+ if ( checkNotFound ( html ) ) return cb ( ' 404' , null )
6767 const products = htmlParser . parseAlbumProducts ( html , albumUrl )
6868 cb ( null , products )
6969 }
@@ -76,7 +76,7 @@ exports.getArtistUrls = function (labelUrl, cb) {
7676 if ( error ) {
7777 cb ( error , null )
7878 } else {
79- if ( checkNotFound ( html ) ) return cb ( " 404" , null ) ;
79+ if ( checkNotFound ( html ) ) return cb ( ' 404' , null )
8080 const artistUrls = htmlParser . parseArtistUrls ( html , labelUrl )
8181 cb ( null , artistUrls )
8282 }
@@ -88,7 +88,7 @@ exports.getArtistInfo = function (artistUrl, cb) {
8888 if ( error ) {
8989 cb ( error , null )
9090 } else {
91- if ( checkNotFound ( html ) ) return cb ( " 404" , null ) ;
91+ if ( checkNotFound ( html ) ) return cb ( ' 404' , null )
9292 const artistInfo = htmlParser . parseArtistInfo ( html , artistUrl )
9393 cb ( null , artistInfo )
9494 }
@@ -100,7 +100,7 @@ exports.getTrackInfo = function (trackUrl, cb) {
100100 if ( error ) {
101101 cb ( error , null )
102102 } else {
103- if ( checkNotFound ( html ) ) return cb ( " 404" , null ) ;
103+ if ( checkNotFound ( html ) ) return cb ( ' 404' , null )
104104 const trackInfo = htmlParser . parseTrackInfo ( html , trackUrl )
105105 cb ( null , trackInfo )
106106 }
0 commit comments