Really sorry if this sounds awfully noob but I've been playing around Python for the past couple of days.
I've been trying to make a desktop client. Long story short, I've manage to make it so it generates a URL for authorization. It goes like http://www.samplesample.com/authorize/oauth_token=[bigassstringhere]&oauth_callback=http://sometokenrecievingurl.com
Going to that URL, I get redirected to http://sometokenrecievingurl.com?oauth_token=[anotherbigassstring]&oauth_verifier=[yetanotherbigassstring]
So my question is is there a way to get the oauth_token and oauth_verifier value without having to manually copy and paste the URL for authorization? Like is there a way for python to check the generated URL by itself, check the URL it's redirected to, then slice out the oauth_token and oauth_verifier part?
Again, sorry if this sounds simple to someone out there. I wouldn't be sure since I'm really new to this and I've been looking all over SO for relevant questions with no luck. Or maybe I'm just looking at the wrong links or terms. But yeah, any help would be appreciated.
Edit
Okay so I continued playing around and I relaized I totally forgot a step here. The generated URL actually directs you to a page where I'll need to click whether to allow access or not. After clicking Allow, that's the only time I get redirected to http://sometokenrecievingurl.com?oauth_token=[anotherbigassstring]&oauth_verifier=[yetanotherbigassstring]
So I was wondering, how do I go on about extracting those strings from an open browser?