+ 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
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.
+ 3
AKSHAY finally I did that.
Might not take too much time to risk timeout I hope.