kshitij10496 / hercules

The mighty hero helping you build projects on top of IIT Kharagpur's academic data
https://hercules-10496.herokuapp.com/api/v1/static/index.html
MIT License
34 stars 18 forks source link

Create a URL Builder for scrapping timetable #4

Open kshitij10496 opened 5 years ago

kshitij10496 commented 5 years ago

Find the best solution to creating the URL required for scrapping Timetable data from ERP.

Refer: /data/scrapper/course_rooms.py

icyflame commented 5 years ago

@kshitij10496 Can you mention a couple of reasons you are not happy with the present string formatting solution? It looks good to me, and gives a pretty high degree of flexibility when the URLs change in the future.

kshitij10496 commented 5 years ago

@kshitij10496 Can you mention a couple of reasons you are not happy with the present string formatting solution? It looks good to me, and gives a pretty high degree of flexibility when the URLs change in the future.

I just don't think string formatting is the best way to create URLs in Go. Ideally, we should use URL type with query parameters.

icyflame commented 5 years ago

In Go? The course scrapper is written in Python though. ❓

kshitij10496 commented 5 years ago

My bad! 😅 What I meant was that string formatting, in general, is not the best way to create URLs, something that I learnt in Go. Hence, we should use the standard library whenever it comes to manipulating URLs. Having said that, I think of this as a nice to have, non-blocking feature which can help people get started contributing. 😅