Last active
April 30, 2020 13:46
-
-
Save ythosa/7fd8feb782dc959ab69a52cd371ef9b0 to your computer and use it in GitHub Desktop.
Revisions
-
ythosa renamed this gist
Apr 30, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ythosa revised this gist
Apr 30, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import subprocess def parsing(site_link): curl_command = f'curl {site_link} > data.json' data = subprocess.run(curl_command, shell=True) if data.returncode != 0: exit('It was some evil there :( Try again :(') -
ythosa revised this gist
Apr 30, 2020 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,7 @@ import json import subprocess def parsing(site_link): curl_command = f'curl {site_link} > data.json' data = subprocess.run(cmd_command, shell=True) @@ -14,4 +11,6 @@ def parsing(playlist_link): exit('It was some evil there :( Try again :(') with open('data.json', 'r', encoding='cp1251') as f: data = json.load(f) return data -
ythosa created this gist
Apr 30, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ # Ez pz parser import json import subprocess def parsing(playlist_link): _, user_id, playlist_id = playlist_link.split('_') user_id = user_id[8:] curl_command = f'curl {site_link} > data.json' data = subprocess.run(cmd_command, shell=True) if data.returncode != 0: exit('It was some evil there :( Try again :(') with open('data.json', 'r', encoding='cp1251') as f: data = json.load(f)