Last active
April 30, 2020 13:46
-
-
Save ythosa/7fd8feb782dc959ab69a52cd371ef9b0 to your computer and use it in GitHub Desktop.
This file contains 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 characters
# Ez pz parser | |
import json | |
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 :(') | |
with open('data.json', 'r', encoding='cp1251') as f: | |
data = json.load(f) | |
return data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment