song/commands/MusicWebsiteParser/MrJattParser.py
def check_if_song_name(self,html):
		'''
		Returns true if user entered artist or movie name
		'''
		soup=BeautifulSoup(html)
		a_list=soup.findAll('a','touch')
		#print a_list
		text=[str(x) for x in a_list]
		text=''.join(text)
		text=text.lower()
		string1='download in 48 kbps'
		string2='download in 128 kbps'
		string3='download in 320 kbps'

		href=''
		if string3 in text:
			#print 'Downloading in 320 kbps'
			href=a_list[2].get('href')
			
		elif string2 in text:
			#print 'Downloading in 128 kbps'
			href=a_list[1].get('href')
			
		elif string1 in text:
			#print 'Downloading in 48 kbps'	
			href=a_list[0].get('href')
		else:
			return (True,'nothing')		

		return (False,href)
def check_if_song_name(self,html):
		'''
		Returns true if user entered artist or movie name
		'''
		soup=BeautifulSoup(html)
		a_list=soup.findAll('a','touch')
		#print a_list
		text=[str(x) for x in a_list]
		text=''.join(text)
		text=text.lower()
		string1='download in 48 kbps'
		string2='download in 128 kbps'
		string3='download in 320 kbps'

		href=''
		if string3 in text:
			#print 'Downloading in 320 kbps'
			href=a_list[2].get('href')
			
		elif string2 in text:
			#print 'Downloading in 128 kbps'
			href=a_list[1].get('href')
			
		elif string1 in text:
			#print 'Downloading in 48 kbps'	
			href=a_list[0].get('href')
		else:
			return (True,'nothing')		

		return (False,href)
def check_if_song_name ( self , html ) : soup = BeautifulSoup ( html ) a_list = soup . findAll ( 'a' , 'touch' ) #print a_list text = [ str ( x ) for x in a_list ] text = '' . join ( text ) text = text . lower ( ) string1 = 'download in 48 kbps' string2 = 'download in 128 kbps' string3 = 'download in 320 kbps' href = '' if string3 in text : #print 'Downloading in 320 kbps' href = a_list [ 2 ] . get ( 'href' ) elif string2 in text : #print 'Downloading in 128 kbps' href = a_list [ 1 ] . get ( 'href' ) elif string1 in text : #print 'Downloading in 48 kbps'	 href = a_list [ 0 ] . get ( 'href' ) else : return ( True , 'nothing' ) return ( False , href )
Returns true if user entered artist or movie name
Returns true if user entered artist or movie name