Question: So I have this bit of code and I tried putting it in `.load` and `.ready` functions but it just doesn't work because the carousel isn't fully loaded yet. 

```
var num_rec = "${recProducts.size()}";
if(num_rec < 5){
    jQuery(".jcarousel-prev").attr("disabled", true);
    jQuery(".jcarousel-next").attr("disabled", true);
    jQuery(".jcarousel-clip").attr("style", 'postion:relative; width:312px;');
}

```

Now this code runs, but is overridden by the carousel options.
Is there an option for the carousel I can use that will run a function to run this code?

If I have only four things in my carousel then there is no need to show any paging because all four things will be displayed so I want to remove paging altogether and make the container a bit larger so that the picture doesn't cut off. If there are more than 4 though I need the paging.

Answer: 
Your user-agent is not defined !

Take that one :

```
#!/usr/bin/python

import urllib2

url = "http://www.google.com/search?q=mysearch";
opener = urllib2.build_opener()
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
print opener.open(url).read()
raw_input()

```

If you like find an other user-agent, you can write `about:config` in the Firefox.
And search "user-agent" :

> 
> Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511
> 
> 
> Googlebot/2.1 (+http://www.google.com/bot.html)
> 
> 
> Opera/7.23 (Windows 98; U) [en]
> 
> 
>
Google has several anti-scraping techniques in place, since they don't want users to get to the results without the APIs or real browsers.

If you are serious about scraping this kind of pages, I suggest you look into: [Selenium](http://seleniumhq.org/) or [Spynner](http://code.google.com/p/spynner/). 

Another advantage is that both execute javascript.