billboard-top-100.js
function getArtistFromChartItem(chartItem) {
	var artist;
	try {
		artist = chartItem.children[1].children[5].children[1].children[3].children[0].data.replace(/\n/g, '');
	} catch (e) {
		artist = '';
	}
	if (artist.trim().length < 1) {
		try {
			artist = chartItem.children[1].children[5].children[1].children[3].children[1].children[0].data.replace(/\n/g, '');
		} catch (e) {
			artist = '';
		}
	}
	return artist;
}
function getArtistFromChartItem(chartItem) {
	var artist;
	try {
		artist = chartItem.children[1].children[5].children[1].children[3].children[0].data.replace(/\n/g, '');
	} catch (e) {
		artist = '';
	}
	if (artist.trim().length < 1) {
		try {
			artist = chartItem.children[1].children[5].children[1].children[3].children[1].children[0].data.replace(/\n/g, '');
		} catch (e) {
			artist = '';
		}
	}
	return artist;
}
function getArtistFromChartItem ( chartItem ) { var artist ; try { artist = chartItem . children [ 1 ] . children [ 5 ] . children [ 1 ] . children [ 3 ] . children [ 0 ] . data . replace ( / \n / g , '' ) ; } catch ( e ) { artist = '' ; } if ( artist . trim ( ) . length < 1 ) { try { artist = chartItem . children [ 1 ] . children [ 5 ] . children [ 1 ] . children [ 3 ] . children [ 1 ] . children [ 0 ] . data . replace ( / \n / g , '' ) ; } catch ( e ) { artist = '' ; } } return artist ; }
Gets the artist from the specified chart item

@param {HTMLElement} chartItem - The chart item
@return {string} The artist

@example

getArtistFromChartItem(<div class="chart-list-item">...</div>) // 'Eminem'
Gets the artist from the specified chart item