Slthy / Microplus-Lenex

Web scraper and Lenex encoder for swimming events hosted by Microplus s.r.l
MIT License
1 stars 0 forks source link

Why is the URL split? #14

Closed CremaLuca closed 1 year ago

CremaLuca commented 1 year ago

Alla linea 12 di functions.py separi url in due variabili, base_url e event https://github.com/Slthy/Microplus-Lenex/blob/b6380314e274b9a568c6320ebd00d117442f74a9/functions.py#L12-L14

ma poi usi le due variabili sempre insieme

https://github.com/Slthy/Microplus-Lenex/blob/b6380314e274b9a568c6320ebd00d117442f74a9/functions.py#L16

https://github.com/Slthy/Microplus-Lenex/blob/b6380314e274b9a568c6320ebd00d117442f74a9/functions.py#L18

https://github.com/Slthy/Microplus-Lenex/blob/b6380314e274b9a568c6320ebd00d117442f74a9/functions.py#L23

Come mai hai fatto la separazione?

Slthy commented 1 year ago
url('https://fin2022.microplustiming.com/NU_2022_07_28-08_04_Roma_web.php')
>>> ['https://fin2022.microplustiming.com/export/NU_', '2022_07_28-08_04_Roma']

Separo l'url del frontend della competizione perché devo manipolarlo:

Effettivamente potrei togliere la funzione e mettere direttamente:

url_elab = url.replace('/NU', '/export/NU').replace('_web.php', '')