url = 'https://u.icq.net/api/v70/rapi/search'
x = requests.post(url, json={"reqId": "5123-432131", "aimsid": "3213.3321321:69323123127",
"params": {"keyword": "79940083322"}})
print(x.status_code, x.text)
import re
dataset_names = ["moscow", "new-york"]
text = """2008 11 186
2009 11 281
2011 11 776
2012 11 856
2011 11 776
2012 11 856"""
prepare_text = re.split('\t+|\n+', text)
out = {k: [{'value_{}'.format(i+1): prepare_text[t+i] for i in range(2)} for t in range(0,len(prepare_text), 2)] for k in dataset_names}
print(out)
def my_list(path):
result = []
for dirname, dirnames, filenames in os.walk(path):
filenames = filter(lambda x: x.endswith('.html'), filenames)
for filename in filenames:
file = os.path.join(dirname, filename)
result.append(file)
return result
value = JsonData.get('folder').get('attrs').get('music').get('a') #это не избавит от ошибки, ибо get от None не работает
try:
value = JsonData['folder']['attrs']['music']['a']
except:
pass #do nothing
a = """
"PrimeFaces.ab({s:"mForm:j_idt242",e:"click",p:"mForm:j_idt242"});;;window.open('https://auction-sandbox.openprocurement.org/tenders/fb5bc41429774f178605639783e62027','_blank')"
"""
a = "PrimeFaces.ab({s:\"mForm:j_idt242\",e:\"click\",p:\"mForm:j_idt242\"});;;window.open('https://auction-sandbox.openprocurement.org/tenders/fb5bc41429774f178605639783e62027','_blank')"