It would be interesting to see your code and figure out why it needs to be opened in the browser first, but if that really is the case:
Just open it with webbrowser first:
import webbrowser
webbrowser.open_new_tab(url)
# rest of your logic below.
This will open the url in your systems default browser.
You could also check if you're missing some flags such as allowing for redirects or if you need an user-agent (so it looks like you're visiting from a browser)
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
response = requests.get(url, headers=headers, allow_redirects = True)
response.raise_for_status()
content = response.text
f = requests.get(url) print(f.text)doesn't work if I don't open the url first in a browser.