Skip to content

Commit

Permalink
Wed, Aug 7, 2024, 9:03 AM +03:00
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdoullahBougataya committed Aug 7, 2024
1 parent 7609b56 commit 0339233
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file modified __pycache__/scrapper.cpython-311.pyc
Binary file not shown.
4 changes: 3 additions & 1 deletion scrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def scrapper():
# Change Thrusts 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 == 21:
row += tuple(map(float, [float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ")[0:7]), float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ")[7:13])]))
else:
row += tuple(map(float, [float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()[0]), float(re.sub("\(.*?\)","()", string_element).replace("()", "").replace(" ", " ").split()[1])]))
# Change numbers from strings to floats
Expand All @@ -78,6 +79,7 @@ def scrapper():
if titles[j] == 'Specific impulse Vac (s)' or titles[j] == 'Specific impulse SL (s)':
row += tuple(map(str, [""]))
print(f"{int((i/len(rows_bs)) * 50)}% done")
print(row)
# append the data with the newly made row if it is not empty
if row != ():
data.append(row)
Expand Down

0 comments on commit 0339233

Please sign in to comment.