Created
February 7, 2011 16:03
-
-
Save javisantana/814591 to your computer and use it in GitHub Desktop.
ayuda a tus funcionarios a hacer más eficiente su trabajo!
This file contains 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
#!/usr/bin/python | |
# -*- encoding: utf-8 -*- | |
# | |
# author: javi santana | |
import urllib2 | |
from BeautifulSoup import BeautifulStoneSoup, BeautifulSoup | |
INFOJOBS_URL = 'http://www.infojobs.net/trabajos.rss/kw_programador' | |
if __name__ == '__main__': | |
b = BeautifulStoneSoup(urllib2.urlopen(INFOJOBS_URL).read()) | |
a_denunciar = (x for x in b.findAll('title') if '/a' not in x.string.lower()) | |
print "*"*20 + "A DENUNCIAR" + "*"*20 | |
for x in a_denunciar: | |
#print x.string, | |
url = x.nextSibling.nextSibling.string | |
if 'http' not in url: | |
url = 'http:' + url | |
c = BeautifulSoup(urllib2.urlopen(url).read()).find('td', {'class': 'logo-empresa'}) | |
if c: | |
print c.find('img')['title'].split('-')[0] + " por contratar a: " + x.string | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment