Skip to content

Commit

Permalink
Sat, Aug 3, 2024, 2:01 PM +03:00
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdoullahBougataya committed Aug 3, 2024
1 parent d001dfd commit b0ff54b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion database_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
print("Table is Ready")
print("Filling the database...")
for i in range(len(engines)):
img = images[i].replace(".", "http://localhost:8080")
img = "http://localhost:8080" + images[i]
cur = con.cursor()
cur.execute(f"INSERT INTO rocket_engines VALUES {(i, ) + engines[i] + (img, )};".replace("''", "NULL"))
con.commit()
Expand Down
2 changes: 1 addition & 1 deletion images_scrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def images_scrapper():
if soup.find("table", {"class" : "infobox"}).find("td", {"class": "infobox-image"}).find("img").get("srcset"):
if len(soup.find("table", {"class" : "infobox"}).find("td", {"class": "infobox-image"}).find("img").get("srcset").split()) > 2 and "Aeon" not in engine_name:
pic_url = "https:" + str(soup.find("table", {"class" : "infobox"}).find("td", {"class": "infobox-image"}).find("img").get("srcset").split()[2])
path = f"./images/{engine_name}.jpg"
path = f"/images/{engine_name}.jpg"
download_image(pic_url, path)
c += 1
print(f"{int(100 * (c/len(engines)))}% done")
Expand Down

0 comments on commit b0ff54b

Please sign in to comment.