+ 2

How to find the actual url /python/requests

My prog works fine for correct inputs. But if someone enters e.g Julia, the request will be redirected to root directory that means https://www.sololearn.com/Leaderboard/Julia will give https://www.sololearn.com/Leaderboard or even sth.else how can I find out, which url actually is taken? I tried resp.url and resp.history but both dont work. https://code.sololearn.com/clMkJuC1Nowv/?ref=app

14th Sep 2020, 12:33 PM
Oma Falk
Oma Falk - avatar
2 ответов
+ 4
The problem is not in your code. The problem is where when you visit https://www.sololearn.com/Leaderboard/other sololearn will show you the global leaderboard instead of a error like 'invalid language name' . So you can do one thing i.e, check the name you got in html page and what's the input by the user.
14th Sep 2020, 1:14 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 3
AKSHAY finally I did that. Might not take too much time to risk timeout I hope.
14th Sep 2020, 1:29 PM
Oma Falk
Oma Falk - avatar