Sending parameters to a remote server via python script
<p>I'm learning python these days, and I have a rather basic question. </p>

<p>There's a remote server where a webserver is listening in on incoming traffic. If I enter a uri like the following in my browser, it performs certain processing on some files for me:  </p>

<pre><code>//223.58.1.10:8000/processVideo?container=videos&amp;video=0eb8c45a-3238-4e2b-a302-b89f97ef0554.mp4
</code></pre>

<p>My rather basic question is: how can I achieve sending the above dynamic parameters (i.e. container = container_name and video = video_name) to <strong>223.58.1.10:8000/processVideo</strong> via a python script?</p>

<p>I've seen ways to <a href="http://stackoverflow.com/questions/2953462/pinging-servers-in-python">ping an IP</a>, but my requirements are more than that. Guidance from experts will be very helpful. Thanks!</p>

<pre><code>import requests
requests.get("http://223.58.1.10:8000/processVideo",data={"video":"123asd","container":"videos"})
</code></pre>

<p>I guess ... its not really clear what you are asking ...</p>

<p>Im sure you could do the same with just urllib and/or urllib2</p>

<pre><code>import urllib
some_url = "http://223.58.1.10:8000/processVideo?video=%s&amp;container=%s"%(video_name,container_name)# you should probably use urllib urllencode here ...

urllib.urlopen(some_url).read()
</code></pre>

python linux