On Monday, April 16, 2012 7:09:06 AM UTC+5, matt dash wrote:
> Gold Prodigy <gpinsider2000@gmail.com> wrote in message <995a6113-3ac5-4b1d-9210-b175ae7bb082@h9g2000yqe.googlegroups.com>...
>
> > Say I want urlread to see the image results for the word 'paper' when
>
> > it's searched. Well, so far, I've been attempting this like so:
>
> >
>
> > urlread('https://www.google.com/search?
>
> > tbm=isch&hl=en&source=hp&biw=1280&bih=644&q=paper#q=paper&hl=en&safe=off&tbm=isch&bav=on.
>
> > 2,or.r_gc.r_pw.r_qf.,cf.osb&fp=1&biw=1600&bih=775');
>
> >
>
> > Everytime I do so, I get an "Error downloading URL" on urlread line
>
> > 108. What exactly I'm I doing wrong here? Thank you.
>
>
>
>
>
> Oh, here it is.
>
>
>
> This still works for me.
>
>
>
> You might need to add this line to urlread:
>
> urlConnection.setRequestProperty('User-Agent','Mozilla 5.0')
>
> Make it line 77. That'll fool google into thinking you're using a browser and not matlab.
where are we supposed to add this line? Im using str=urlread('https://www.google.com/search?q=[rice]')
or
str=urlread('http://www.google.com/search?q=[rice]')
and it keeps on giving
??? Error using ==> urlread at 108
Error downloading URL.
I dont know what to do. Please help me.
> Gold Prodigy <gpinsider2000@gmail.com> wrote in message <995a6113-3ac5-4b1d-9210-b175ae7bb082@h9g2000yqe.googlegroups.com>...
>
> > Say I want urlread to see the image results for the word 'paper' when
>
> > it's searched. Well, so far, I've been attempting this like so:
>
> >
>
> > urlread('https://www.google.com/search?
>
> > tbm=isch&hl=en&source=hp&biw=1280&bih=644&q=paper#q=paper&hl=en&safe=off&tbm=isch&bav=on.
>
> > 2,or.r_gc.r_pw.r_qf.,cf.osb&fp=1&biw=1600&bih=775');
>
> >
>
> > Everytime I do so, I get an "Error downloading URL" on urlread line
>
> > 108. What exactly I'm I doing wrong here? Thank you.
>
>
>
>
>
> Oh, here it is.
>
>
>
> This still works for me.
>
>
>
> You might need to add this line to urlread:
>
> urlConnection.setRequestProperty('User-Agent','Mozilla 5.0')
>
> Make it line 77. That'll fool google into thinking you're using a browser and not matlab.
where are we supposed to add this line? Im using str=urlread('https://www.google.com/search?q=[rice]')
or
str=urlread('http://www.google.com/search?q=[rice]')
and it keeps on giving
??? Error using ==> urlread at 108
Error downloading URL.
I dont know what to do. Please help me.