Skip to content

Commit

Permalink
Wed, Aug 7, 2024, 9:18 AM +03:00
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdoullahBougataya committed Aug 7, 2024
1 parent 564fdc8 commit 2d010eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Binary file modified __pycache__/scrapper.cpython-311.pyc
Binary file not shown.
10 changes: 5 additions & 5 deletions scrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ def scrapper():
if string_element.find('Д') != -1 or string_element.find('8D6') != -1 or string_element.find('11D2') != -1 or string_element.find('11D5') != -1 or string_element.find('15D1') != -1 or string_element.find('15D3') != -1:
string_element = string_element.split()[0]
# Split the specific impulse column into Isp in the vaccum and Isp in the sea level
if titles[j] == 'Specific impulse Vac (s)' and (len(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()) > 1 or i in [17, 28]):
if titles[j] == 'Specific impulse Vac (s)' and (len(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()) > 1): # or i in [17, 28]
# Change the Isps intervals to medians
if string_element.find('–') != -1:
row += tuple(map(float, [(float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()[0].split('–')[0]) + float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()[0].split('–')[1])) / 2, (float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()[1].split('–')[0]) + float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()[1].split('–')[1])) / 2]))
elif i == 17:
row += tuple(map(float, [float(re.sub("\(.*?\)","()", string_element).replace("()", "")[0:3]), float(re.sub("\(.*?\)","()", string_element).replace("()", "")[2:6])]))
elif i == 28:
row += tuple(map(float, [float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ")[0:3]), float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ")[3:6])]))
# elif i == 17:
# row += tuple(map(float, [float(re.sub("\(.*?\)","()", string_element).replace("()", "")[0:3]), float(re.sub("\(.*?\)","()", string_element).replace("()", "")[2:6])]))
# elif i == 28:
# row += tuple(map(float, [float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ")[0:3]), float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ")[3:6])]))
else:
row += tuple(map(float, [float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()[0]), float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()[1])]))
elif titles[j] == 'Specific impulse Vac (s)' and string_element[string_element.find("(")+1:string_element.find(")")] == 'Vac':
Expand Down

0 comments on commit 2d010eb

Please sign in to comment.