On 20/05/13 17:55, Peter Otten wrote:
I've rerun the script and it still works over here. I'm in Germany, though,
and therefore there's a small chance that I'm being served different data.
What does
import urllib2
Thank you Peter for your detailed reply, I now have a better
understanding of
On 19/05/13 18:05, Peter Otten wrote:
The original Python 2 code:
$ cat parse.py
import urllib2
import json
url = "http://*/goldencasket";
s = urllib2.urlopen(url).read()
s = s.partition("latestResults_productResults")[2].lstrip(" =")
s = s.partition(";")[0]
data = json.loads(s)
lot
On 19/05/13 21:46, Dave Angel wrote:
Have you simply tried using urlib.request ? That should be built into
Python 3.3 without any outside packages from Kubuntu. (I haven't used
Kubuntu, just making some bald assumptions)
Thanks Dave,
Thanks Dave,
The urllib.request package has the same depe
On 05/19/2013 07:30 AM, Phil wrote:
On 19/05/13 18:05, Peter Otten wrote:
Phil wrote:
My apatite having been whetted I'm now stymied because of a Ubuntu
dependency problem during the installation of urllib3. This is listed as
a bug. Has anyone overcome this problem?
Perhaps there's another li
On 19/05/13 18:05, Peter Otten wrote:
Phil wrote:
My apatite having been whetted I'm now stymied because of a Ubuntu
dependency problem during the installation of urllib3. This is listed as
a bug. Has anyone overcome this problem?
Perhaps there's another library that I can use to download data
Phil wrote:
> My apatite having been whetted I'm now stymied because of a Ubuntu
> dependency problem during the installation of urllib3. This is listed as
> a bug. Has anyone overcome this problem?
>
> Perhaps there's another library that I can use to download data from a
> web page?
You mean y
My apatite having been whetted I'm now stymied because of a Ubuntu
dependency problem during the installation of urllib3. This is listed as
a bug. Has anyone overcome this problem?
Perhaps there's another library that I can use to download data from a
web page?
--
Regards,
Phil
_
On 18/05/13 22:44, Peter Otten wrote:
You can use a tool like lxml that "understands" html (though in this case
you'd need a javascript parser on top of that) -- or hack something together
with string methods or regular expressions. For example:
import urllib2
import json
s = urllib2.urlopen("h
Hi
Just a minor observation:
On 18 May 2013 13:44, Peter Otten <__pete...@web.de> wrote:
> Phil wrote:
>
> > On 18/05/13 19:25, Peter Otten wrote:
> >>
> >> Are there alternatives that give the number as plain text?
> >
> > Further investigation shows that the numbers are available if I view the
Phil wrote:
> On 18/05/13 19:25, Peter Otten wrote:
>>
>> Are there alternatives that give the number as plain text?
>
> Further investigation shows that the numbers are available if I view the
> source of the page. So, all I have to do is parse the page and extract
> the drawn numbers. I'm not s
On 18/05/13 19:25, Peter Otten wrote:
Are there alternatives that give the number as plain text?
Further investigation shows that the numbers are available if I view the
source of the page. So, all I have to do is parse the page and extract
the drawn numbers. I'm not sure, at the moment, how
On 18/05/13 19:25, Peter Otten wrote:
What's the url of the page?
http://tatts.com/goldencasket
Are there alternatives that give the number as plain text?
Not that I can find. A Google search hasn't turned up anything.
If not, do the images have names like whatever0.jpg, whatever1.jpg,
w
Phil wrote:
> On 18/05/13 16:33, Alan Gauld wrote:
>> On 18/05/13 00:57, Phil wrote:
>>> I'd like to "download" eight digits from a web site where the digits are
>>> stored as individual graphics. Is this possible, using perhaps, one of
>>> the countless number of Python modules? Is this the funct
On 18/05/13 16:33, Alan Gauld wrote:
On 18/05/13 00:57, Phil wrote:
I'd like to "download" eight digits from a web site where the digits are
stored as individual graphics. Is this possible, using perhaps, one of
the countless number of Python modules? Is this the function of a web
scraper?
In
On 18/05/13 00:57, Phil wrote:
I'd like to "download" eight digits from a web site where the digits are
stored as individual graphics. Is this possible, using perhaps, one of
the countless number of Python modules? Is this the function of a web
scraper?
In addition to Dave's points there is als
On 05/17/2013 07:57 PM, Phil wrote:
I'd like to "download" eight digits from a web site where the digits are
stored as individual graphics. Is this possible, using perhaps, one of
the countless number of Python modules? Is this the function of a web
scraper?
Anything's possible. But if these
I'd like to "download" eight digits from a web site where the digits are
stored as individual graphics. Is this possible, using perhaps, one of
the countless number of Python modules? Is this the function of a web
scraper?
--
Regards,
Phil
___
Tutor
17 matches
Mail list logo