Kejax / SpaceTradersSQLiteBuilder

0 stars 0 forks source link

URL Construction Issue #1

Open chatterchats opened 5 months ago

chatterchats commented 5 months ago

Where in code issue is present:

https://github.com/Kejax/SpaceTradersSQLiteBuilder/blob/8ef4959620ee8b51ff5d7f8e804b52c7c9014bbc/main.py#L5

https://github.com/Kejax/SpaceTradersSQLiteBuilder/blob/8ef4959620ee8b51ff5d7f8e804b52c7c9014bbc/main.py#L25

Issue:

api_url string ends with a / request.get starts with a /

constructed url would be https://api.spacetraders.io/v2//systems?page={i}&limit=20

Resolution:

Remove trailing slash from api_url or Remove leading slash from requests.get call.

Kejax commented 5 months ago

Urls work as well when they have double slashes in them. I put this one there by intention, in case I change the base url and forget to place a trailing slash