Posted By

nerdfiles on 02/02/13


Tagged

python osx colorrrs


Versions (?)

Synesthor Thinks (get a color from colorrrs.com)


 / Published in: Python
 

alias synesthor_thinks="py /Users/nerdfiles/Tools/colorrrs/colorrrs.py | pbcopy"

  1. #!/usr/bin/python
  2.  
  3. from pyquery import PyQuery as pq
  4. from lxml import etree
  5. import urllib
  6. d = pq(url="http://colorrrs.com/")
  7.  
  8. def grab_color():
  9. synesthor_thinks = d('h1').text()
  10. print synesthor_thinks
  11.  
  12. if __name__ == '__main__':
  13. grab_color()

Report this snippet  

You need to login to post a comment.