2

The following works when I paste it on the browser:

localhost://api/get_url.py?x=xxx&y=yyy

how can i store the values of x and y in a variable passing from url ?

1 Answer 1

1

The requests module has made it really simple.

Please read: http://docs.python-requests.org/en/master/user/quickstart/#passing-parameters-in-urls

import requests
response = requests.get('localhost://api/get_url.py', params={'x': x, 'y': y})
Sign up to request clarification or add additional context in comments.

1 Comment

thanks for your replay ... its working fine @blhsing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.