This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| current_user = random.choice(users) | |
| site = Site.objects.filter(created_by=current_user).order_by('?')[0] | |
| try: | |
| keyword = Keyword.objects.filter(url__site=site).order_by('?')[0] | |
| except Exception: | |
| #some sites have no keywords | |
| keyword = Keyword.objects.filter(url__created_by=current_user).order_by('?')[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| yum install libxslt-devel libxml2-devel | |
| wget http://pypi.python.org/packages/source/l/lxml/lxml-2.2.2.tar.gz | |
| tar xzf lxml-2.2.2.tar.gz | |
| cd lxml-2.2.2 | |
| python setup.py install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /tmp | |
| curl http://www.opensource.apple.com/source/curl/curl-57.2/curl-7.19.7.tar.bz2 | tar xz | |
| cd curl-7.19.7 | |
| ./configure --prefix=/opt/local/ | |
| make | |
| make install | |
| cd /tmp | |
| curl http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz | tar xz | |
| cd pycurl-7.19.0 | |
| sudo python setup.py install --curl-config=/opt/local/bin/curl-config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /tmp | |
| curl -OL http://codespeak.net/lxml/lxml-2.2.2.tgz | |
| tar -xzvf lxml-2.2.2.tgz | |
| cd lxml-2.2.2 | |
| cd libs/ | |
| curl -OL ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz | |
| curl -OL ftp://xmlsoft.org/libxml2/libxslt-1.1.24.tar.gz | |
| cd .. | |
| python setup.py build --static-deps --libxml2-version=2.7.3 --libxslt-version=1.1.24 | |
| sudo python setup.py install |