fixed indentation error and ran mcsm_wrapper dcs
This commit is contained in:
parent
bc03aab82d
commit
368496733a
2 changed files with 8 additions and 8 deletions
11
mcsm/mcsm.py
11
mcsm/mcsm.py
|
@ -124,9 +124,9 @@ def scrape_results(result_url):
|
|||
print('FAIL: Could not fetch results'
|
||||
, '\nCheck if url is valid')
|
||||
# extract results using the html parser
|
||||
soup = BeautifulSoup(result_response.text, features = 'html.parser')
|
||||
soup = BeautifulSoup(result_response.text, features = 'html.parser')
|
||||
# print(soup)
|
||||
web_result_raw = soup.find(class_ = 'span4').get_text()
|
||||
web_result_raw = soup.find(class_ = 'span4').get_text()
|
||||
|
||||
return web_result_raw
|
||||
|
||||
|
@ -156,11 +156,10 @@ def build_result_dict(web_result_raw):
|
|||
result_dict = {}
|
||||
for line in mytext.split('\n'):
|
||||
fields = line.split(':')
|
||||
# print(fields)
|
||||
#print(fields)
|
||||
if len(fields) > 1: # since Mutaton information is empty
|
||||
dict_entry = dict([(x, y) for x, y in zip(fields[::2], fields[1::2])])
|
||||
result_dict.update(dict_entry)
|
||||
|
||||
dict_entry = dict([(x, y) for x, y in zip(fields[::2], fields[1::2])])
|
||||
result_dict.update(dict_entry)
|
||||
return result_dict
|
||||
#%%
|
||||
#=======================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue