Irv Kalb writes:
>> On Oct 14, 2017, at 6:46 PM, Ben Bacarisse wrote:
Finally, wget -S shows that the resource has moved. It is now at
Location: http://download.finance.yahoo.com/d/quotes.csv?s=aapl&f=l1
I don't think this has anything to do with your problem, but it'
> On Oct 14, 2017, at 6:46 PM, Ben Bacarisse wrote:
>
> Irv Kalb writes:
>
>> Thank you!
>
> You're welcome.
>
>
>>> Just a data point... It works here:
>>>
>>> $ python3 t.py
>>> Response is: b'156.99\n'
>>> $ cat t.py
>>> import urllib.request
>>> fullURLWithParameters = 'http://financ
Irv Kalb writes:
> Thank you!
You're welcome.
>> Just a data point... It works here:
>>
>> $ python3 t.py
>> Response is: b'156.99\n'
>> $ cat t.py
>> import urllib.request
>> fullURLWithParameters = 'http://finance.yahoo.com/d/quotes.csv?s=aapl&f=l1'
>> # read all the data
>> response = ur
Thank you!
> On Oct 14, 2017, at 12:10 PM, Ben Bacarisse wrote:
>
> Irv Kalb writes:
>
> Lots of detail snipped. I hope it won't matter...
>
>> > (_ssl.c:749)>
>>
>> Huh???
>>
>> I've read a bunch of documentation, and it looks like I'm doing
>> everything right, but I cannot get this to w
urllib.urlOpen to fetch data through an API. I am using an API that I found
here:http://www.jarloo.com/yahoo_finance/
<http://www.jarloo.com/yahoo_finance/>
As a minimal example, I am trying to get the latest stock price for Apple.
The following example works perfectly in Python 2:
Irv Kalb writes:
Lots of detail snipped. I hope it won't matter...
> (_ssl.c:749)>
>
> Huh???
>
> I've read a bunch of documentation, and it looks like I'm doing
> everything right, but I cannot get this to work. Any other
> suggestions to get this 3 line program to work correctly?
Just a da
fullURLWithParameters = 'http://finance.yahoo.com/d/quotes.csv?s=aapl&f=l1'
# read all the data
response = urllib.urlopen(fullURLWithParameters).read()
print('Response is: ', response)
I get the following:
Traceback (most recent call last):
File " s/StockQuo
> fullURLWithParameters = 'http://finance.yahoo.com/d/quotes.csv?s=aapl&f=l1'
>
> # read all the data
> response = urllib.urlopen(fullURLWithParameters).read()
>
> print('Response is: ', response)
>
> I get the following:
>
> Traceback (most
urllib.urlOpen to fetch data through an API. I am using an API that I found
here:http://www.jarloo.com/yahoo_finance/
<http://www.jarloo.com/yahoo_finance/>
As a minimal example, I am trying to get the latest stock price for Apple.
The following example works perfectly in Python 2:
imports and uses urllib.urlOpen to fetch data through an API. I am
> using an API that I found here:http://www.jarloo.com/yahoo_finance/
> <http://www.jarloo.com/yahoo_finance/>
>
Hi Irv,
That's great! It's always nice to hear about more people moving with the
t
On Fri, Oct 13, 2017 at 5:27 PM, Irv Kalb wrote:
> I've looked at the Python 3.6 documentation for urllib, and I see that
> certain calls have been changed and others have been eliminated. But my eyes
> glaze over trying to figure out what to use instead.
>
> My question is: Is there a simple
One of the colleges where I teach has just moved from Python 2 to Python 3. I
am in the process of converting my beginning Python class from Python 2 to
Python 3. Everything has gone smoothly, until I just tried to convert some
code that imports and uses urllib.urlOpen to fetch data through
On Tue, 11 May 2010 07:35:52 -0700 (PDT)
Dominik Gabi wrote:
> > For the record, have you tried calling gobject.threads_init() at the
> > beginning of your application (just after importing all modules)?
>
> I haven't... now it works, thanks :) Any tips on how to avoid mistakes
> like that in th
> For the record, have you tried calling gobject.threads_init() at the
> beginning of your application (just after importing all modules)?
I haven't... now it works, thanks :) Any tips on how to avoid mistakes
like that in the future? I'm somewhat confused as to how I was
supposed to get this out
On Tue, 11 May 2010 06:22:29 -0700 (PDT)
Dominik Gabi wrote:
>
> I'm new to python and have been playing around with it for a few days
> now. So please forgive me if this is a stupid question :)
>
> I've tried writing a little application with pygtk and urllib.
For the record, have you tried ca
thread is running but as soon as I call
urllib.urlopen("https://someurl";, postdata) it blocks. It blocks until
I do something in the interface (e.g. click another button). I've
obviously missed something here. The interface should not interfere
with anything that runs in an other thread!?
On Wed, 03 Feb 2010 21:33:08 -0600, Michael Gruenstaeudl wrote:
> I am fairly new to Python and need advice on the urllib.urlopen()
> function. The website I am trying to open automatically refreshes
> after 5 seconds and remains stable thereafter. With
> urllib.urlopen().read(
En Thu, 04 Feb 2010 00:33:08 -0300, Michael Gruenstaeudl
escribió:
I am fairly new to Python and need advice on the urllib.urlopen()
function. The website I am trying to open automatically refreshes after
5 seconds and remains stable thereafter. With urllib.urlopen().read() I
can only
Michael Gruenstaeudl wrote:
> Hi,
> I am fairly new to Python and need advice on the urllib.urlopen()
> function. The website I am trying to open automatically refreshes after
> 5 seconds and remains stable thereafter. With urllib.urlopen().read() I
> can only read the init
Hi,
I am fairly new to Python and need advice on the urllib.urlopen()
function. The website I am trying to open automatically refreshes
after 5 seconds and remains stable thereafter. With
urllib.urlopen().read() I can only read the initial but not the
refreshed page. How can I access the
On 26 Sep, 12:21, Wojtek Walczak <[EMAIL PROTECTED]> wrote:
> On Fri, 26 Sep 2008 02:23:18 -0600, Iain Dalton wrote:
> > InEmacs, using run-python,
>
> > import urllib
> > urllib.urlopen('http://www.google.com/')
>
> > results in this trac
On Fri, 26 Sep 2008 02:23:18 -0600, Iain Dalton wrote:
> In Emacs, using run-python,
>
> import urllib
> urllib.urlopen('http://www.google.com/')
>
> results in this traceback:
...
> IOError: [Errno socket error] (111, 'Connection refused')
>
In Emacs, using run-python,
import urllib
urllib.urlopen('http://www.google.com/')
results in this traceback:
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.5/urllib.py", line 82, in urlopen
return ope
I read the urllib
reference and set http_proxy="my proxy". But it didn't work. I can't
even get authenticated. Is there anyway that we can set the proxy?
--
http://mail.python.org/mailman/listinfo/python-list
Hi i want to do proxy in urllib.urlopen how can i do this ?
And which proxy type have i can prefer ?
--
http://mail.python.org/mailman/listinfo/python-list
if you want to hardcode the password in the url. What you need to do is
http:username:[EMAIL PROTECTED]
On 10/14/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>
> rodrigo schrieb:
> > I am trying to retrieve a password protected page using:
> >
> &
> On Behalf Of rodrigo
> I am trying to retrieve a password protected page using:
>
> get = urllib.urlopen('http://password.protected.url";').read()
I would suggest looking at mechanize.
http://wwwsearch.sourceforge.net/mechanize/
from mechanize import Browser
You form the URL thus:
http://:@:/
This is defined in RFC 1738 <http://www.faqs.org/rfcs/rfc1738.html>
On 10/14/07, rodrigo <[EMAIL PROTECTED]> wrote:
>
> I am trying to retrieve a password protected page using:
>
> get = urllib.urlopen('http://password.protected.u
On Oct 13, 11:41 pm, rodrigo <[EMAIL PROTECTED]> wrote:
> I am trying to retrieve a password protected page using:
>
> get = urllib.urlopen('http://password.protected.url";').read()
>
> While doing this interactively, I'm asked for the username, then the
&
rodrigo schrieb:
> I am trying to retrieve a password protected page using:
>
> get = urllib.urlopen('http://password.protected.url";').read()
>
> While doing this interactively, I'm asked for the username, then the
> password at the terminal.
> Is there
I am trying to retrieve a password protected page using:
get = urllib.urlopen('http://password.protected.url";').read()
While doing this interactively, I'm asked for the username, then the
password at the terminal.
Is there any way to do this non-interactively? To hardcode
Laszlo Nagy wrote:
> > Any ideas why I don't get the same result from the python script as I
> > do from a web browser? This problem seems to be a recent
> > development. The scripts I wrote like this worked fine for a while
> > and then stopped working within the past couple of weeks.
> >
> May
[EMAIL PROTECTED] wrote:
> import urllib
> f = urllib.urlopen('http://en.wikipedia.org/wiki/Cain')
> data = f.read(999)
> f.close()
> f1 = open('junk.txt', 'w')
> f1.write(data)
> f1.close()
Did you see the file "junk.txt"? I
En Thu, 12 Apr 2007 15:25:03 -0300, <[EMAIL PROTECTED]> escribió:
> Any ideas why I don't get the same result from the python script as I
> do from a web browser? This problem seems to be a recent
> development. The scripts I wrote like this worked fine for a while
> and then stopped working wit
> Any ideas why I don't get the same result from the python script as I
> do from a web browser? This problem seems to be a recent
> development. The scripts I wrote like this worked fine for a while
> and then stopped working within the past couple of weeks.
>
Maybe it has to do something wi
not
getting it. Instead, I get a file only 21 kb that has no image
addresses. Here's the code I use:
import urllib
f = urllib.urlopen('http://en.wikipedia.org/wiki/Cain')
data = f.read(999)
f.close()
f1 = open('junk.txt', 'w')
f1.write(data)
f1.close()
Any ide
En Thu, 05 Apr 2007 02:40:38 -0300, Xell Zhang <[EMAIL PROTECTED]>
escribió:
> hello all,
> I am a newbie in Python.
> In my module, if I call urllib.urlopen() function like:
> url = "http://www.google.com/";
> source = urllib.urlopen(url)
>
> Then in
hello all,
I am a newbie in Python.
In my module, if I call urllib.urlopen() function like:
url = "http://www.google.com/";
source = urllib.urlopen(url)
Then in the output there will be an exception:
Exception exceptions.AttributeError: "'NoneType' object has no
John Nagle <[EMAIL PROTECTED]> writes:
>If you try to open a password protected page with "urllib.urlopen()", you
> get
>
> "Enter username for EnterPassword at example.com:"
>
> on standard output, followed by a read for input! This see
If you try to open a password protected page with "urllib.urlopen()", you get
"Enter username for EnterPassword at example.com:"
on standard output, followed by a read for input! This seems to be an
undocumented feature, if not a bug. Definitely the docum
[EMAIL PROTECTED] a écrit :
> Hi,
>
> I'm just trying to read from a webpage with urllib but I'm getting
> IOErrors. This is my code:
>
> import urllib
> sock = urllib.urlopen("http://www.google.com/";)
>
> and this is the error:
>
> Trace
Dennis,
I tried a ProxyHandler with the following code ...
proxy_support = urllib2.ProxyHandler({})
opener = urllib2.build_opener(proxy_support)
urllib2.install_opener(opener)
... but it's giving me the same result.
Then I tried to tunnel using code from ...
http://aspn.activestate.com/ASPN/Co
Hi Salvatore,
Even if I catch the exceptions in a loop it goes on forever.
- ken
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Try to increase the time out : socket.settimeout(n)
and catch the timeout error when it occurs
Regards
[EMAIL PROTECTED] a écrit :
> Hi,
>
> I'm just trying to read from a webpage with urllib but I'm getting
> IOErrors. This is my code:
>
> import urllib
&
Hi,
I'm just trying to read from a webpage with urllib but I'm getting
IOErrors. This is my code:
import urllib
sock = urllib.urlopen("http://www.google.com/";)
and this is the error:
Traceback (most recent call last):
File "", line 1, in
sock = urllib.
"mwt" <[EMAIL PROTECTED]> writes:
> Fredrik Lundh wrote:
[...]
> > use urllib2 and cookielib. here's an outline:
> >
> > import urllib2, cookielib
> >
> > # set things up
> > jar = cookielib.CookieJar()
> > handler = urllib2.HTTPCookieProcessor(jar)
> > opener = urllib2.build_
Fredrik Lundh wrote:
> Øyvind Østlund wrote:
>
> > I am trying to visit a limited amount of web pages that requires cookies. I
> > will get redirected if my application does not handle them. I am using
> > urllib.urlopen() to visit the pages right now. And I need a push in
Øyvind Østlund wrote:
> I am trying to visit a limited amount of web pages that requires cookies. I
> will get redirected if my application does not handle them. I am using
> urllib.urlopen() to visit the pages right now. And I need a push in the
> right direction to find out how
I am trying to visit a limited amount of web pages that requires
cookies. I will get redirected if my application does not handle them.
I am using urllib.urlopen() to visit the pages right now. And I need a
push in the right direction to find out how to deal with pages that
requires cookies
Does anyone have an entire (simple) script for someone new to
programming and Python that will illustrate how to open an https site
and log on to it (with the script providing the username and password,
if that's possible). Thanks very much.
rpd
"Electricity is actually made up of extremely tiny
That's what I get for scimming the documentation too quickly.
Got it, thanks!
For anyone else working on something similar, here is all I did... mind
you, this is my first experience with python.
# subclass of FancyURLopener so we can override the
prompt_user_password method
class DBCheckUrlOpen
>From the docs for urllib:
When performing basic authentication, a FancyURLopener instance calls
its prompt_user_passwd() method. The default implementation asks the
users for the required information on the controlling terminal. A
subclass may override this method to support more appropriate beha
Hi,
I'm new to python. I've been handed the job of modifying a script we
have here at work that pulls content from a zope site, to create static
html. They wanted a check to make sure the database is up, while
pulling, to avoid errors.
I got it pretty much working how I want without any problems.
On Sat, 17 Dec 2005, Dennis Lee Bieber wrote:
> (Now there is an interesting technical term:
> #define ERROR_ARENA_TRASHED 7)
FreeBSD at one point had an EDOOFUS; Apple kvetched about this being
offensive, so it was changed to EDONTPANIC.
I shitteth thee not.
tom
--
information distribut
Thanks, guys.
I tried on a different computer, and it worked fine.I then found out
that my computer thyought i had a proxy server, and after i cleaned
that up, it worked.
Thanks again
--
http://mail.python.org/mailman/listinfo/python-list
Jay wrote:
> Easy Fix...
>
> import urllib
> the_url = "http://www.google.com";
> req = urllib.urlopen(the_url)
>
> Does this work for you??
This does look like proxie /firewall issue, try it from an internet
cafe. Also depending on the site, you may have t
Easy Fix...
import urllib
the_url = "http://www.google.com";
req = urllib.urlopen(the_url)
Does this work for you??
--
http://mail.python.org/mailman/listinfo/python-list
I tried using urllib2 and this is what i got:
>>import urllib2
>>the_url = 'http://www.google.com'
>>req = urllib2.Request(the_url)
>>handle = urllib2.urlopen(req)
Traceback (most recent call last):
File "", line 1, in ?
File "C:\Python24\lib\urllib2.py", line 130, in urlopen
return _opener
JabaPyth wrote:
> Hello,
> I'm trying to use the urllib module, but when i try urllib.urlopen, it
> gives me a socket error:
>
> >>import urllib
> >>print urllib.urlopen('http://www.google.com/').read()
> Traceback (most recent call last
Hello,
I'm trying to use the urllib module, but when i try urllib.urlopen, it
gives me a socket error:
>>import urllib
>>print urllib.urlopen('http://www.google.com/').read()
Traceback (most recent call last):
File "", line 1, in ?
Josef Cihal wrote:
> Hallo,
>
> i need a help with module URLLIB.
>
> I am trying to open url via:
> -urllib.urlopen
> ('http://brokerjet.ecetra.com/at/markets/stocks/indices.phtml?notation=92866')
>
>
> Problem is, that I am always redirecting t
- Original Message -
From: Josef Cihal
To: python-list@python.org
Sent: Saturday, September 03, 2005 12:09 AM
Subject: urllib.urlopen doesn't work
Hallo,
i need a help with module URLLIB.
I am trying to open url via:
- urllib.urlopen
('http://brokerjet.ece
Hallo,
i need a help with module URLLIB.
I am trying to open url via:
- urllib.urlopen
('http://brokerjet.ecetra.com/at/markets/stocks/indices.phtml?notation=92866')
Problem is, that I am always redirecting to
- LOGIN page (www.brokerjet.at),
and cannot get my page
hello,
I have an odd behaviour. I try to download some files connected to a
specific webpage (e.g. all stylesheets) with
urllib2.urlopen(x)
This seems to hang on the 2nd file or so.
Doing the exact same thing via
urllib.urlopen(x)
does work without a hitch...
I don't real
64 matches
Mail list logo