# Copyright Anshuman73.
# Visit anshuman73.github.io for more info.
# Released under MIT License.
# Works with Python 2.7

import json
import urllib

def main(query):
	#get the data
	raw_data = urllib.urlopen("https://www.musixmatch.com/search/%s/lyrics" % query).readlines()[30]
	#Data has some HTML, parse it to make it perfect json
	raw_data = raw_data[raw_data.find('{') : raw_data.rfind('}') + 1]
	data = json.loads(raw_data) #Ready to query data
	song =  data['lyricsTracks']['0']['attributes']['track_name']
	artist = data['lyricsTracks']['0']['attributes']['artist_name']
	album = data['lyricsTracks']['0']['attributes']['album_name']

	print "\n\nSong Name:", song
	print "\nArtist:", artist
	print "\nAlbum:", album


main(str(raw_input("\nEnter the lyrics: \n\n")))

@@ -135,22 +135,24 @@
 %0Aimport 
-urllib
+requests
 %0A%0Adef ma
@@ -182,225 +182,482 @@
 ta%0A%09
-raw_data = urllib.urlopen(%22https://www.musixmatch.com/search/%25s/lyrics%22 %25 query).readlines()%5B30%5D%0A%09#Data has some HTML, parse it to make it perfect json%0A%09raw_data = raw_data%5Braw_data.find('%7B') : raw_data.rfind('%7D') + 1
+headers = %7B'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)'%0A                             'Chrome/53.0.2785.116 Safari/537.36'%7D%0A%09raw_data = requests.get(%22https://www.musixmatch.com/search/%25s/lyrics%22 %25 query, headers=headers).text.encode('utf-8')%0A%09#raw_data is now a HTML dump, parse it to make it perfect json%0A%09raw_data = raw_data%5Braw_data.find('%7B', raw_data.find('mxmProps')) : raw_data.find('%3C/script%3E', raw_data.find('mxmProps'))
 %5D%0A%09d
@@ -688,17 +688,23 @@
 a) #
-R
+ Data r
 eady to 
 quer
@@ -703,19 +703,125 @@
  to 
+be 
 quer
-y data%0A
+ied%0A%09%0A%09total_results = data%5B'lyricsTracks'%5D%5B'length'%5D%0A%09%0A%09print %22Top 5 results are:%5Cn%22%0A%09%0A%09for x in xrange(5):%0A%09
 %09son
@@ -838,35 +838,38 @@
 'lyricsTracks'%5D%5B
-'0'
+str(x)
 %5D%5B'attributes'%5D%5B
@@ -882,16 +882,17 @@
 _name'%5D%0A
+%09
 %09artist 
@@ -906,35 +906,38 @@
 'lyricsTracks'%5D%5B
-'0'
+str(x)
 %5D%5B'attributes'%5D%5B
@@ -951,16 +951,17 @@
 _name'%5D%0A
+%09
 %09album =
@@ -986,11 +986,14 @@
 s'%5D%5B
-'0'
+str(x)
 %5D%5B'a
@@ -1018,17 +1018,20 @@
 _name'%5D%0A
-%0A
+%09%09%0A%09
 %09print %22
@@ -1052,16 +1052,17 @@
 %22, song%0A
+%09
 %09print %22
@@ -1080,16 +1080,17 @@
  artist%0A
+%09
 %09print %22
@@ -1107,17 +1107,16 @@
  album%0A%0A
-%0A
 main(str

make it work ;)