-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to lecture room/location not always created? #47
Comments
https://github.com/adamcik/plan/blob/master/plan/scrape/ntnu/web.py#L106 sorts based on the exact match, and then tries the first result and gives up. So yes the heuristics for matching could without doubt be improved. I think I even left a TODO in the code for this type of cases. |
Ok, thanks for reminding me to look at this again. So I think I can use https://www.ime.ntnu.no/api/fdv/buildings + https://www.ime.ntnu.no/api/fdv/rooms to create a mapping from lydiaCode --> http://www.ntnu.no/kart/358/424 type links. |
Right, so didn't end up going the API route, had forgotten about how many funny cases there are in handling that data correctly. But instead added handling for when we get the room directly from http://www.ntnu.no/studieinformasjon/rom/?romnr=358424 so that Vembi and a few other missing rooms should now be in place. |
Great! |
It seems that some locations don't get hyperlinked, in this case Vembi:
Without hyperlink
With hyperlink
Not quite sure how the links are made, but
gives lydiaCode 358424 which in turn I would think is used in the following query:
http://www.ntnu.no/studieinformasjon/rom/?romnr=358424
The result from this query among other things gives this url which should be appropriate as a hyperlink for Vembi:
http://www.ntnu.no/kart/358/424
Unsure as to why the hyperlink is not created. Haven't studied the Plan code enough, but a very wild guess would be that it has something to do with "location" and "name" not being equal?
From https://www.ime.ntnu.no/api/schedule/it3105
From https://www.ime.ntnu.no/api/fdv/rooms/lydiacode:358424
Any thoughts?
The text was updated successfully, but these errors were encountered: