Skip to content

Instantly share code, notes, and snippets.

@Zeerg
Created November 28, 2016 17:45
Show Gist options
  • Save Zeerg/aec7d8f4d36c1831edc7a4a06bd04ee9 to your computer and use it in GitHub Desktop.
Save Zeerg/aec7d8f4d36c1831edc7a4a06bd04ee9 to your computer and use it in GitHub Desktop.
python job thing
#!/usr/bin/env python
import json
import urllib2
import feedparser
from datetime import datetime
url = {'remoteok': "https://remoteok.io/index.json?description=&location=Remote&tags=sys%20admin",'stackrss': "http://stackoverflow.com/jobs/feed?tl=sysadmin"}
openurl = urllib2.urlopen(url['remoteok']).read()
result = json.loads(openurl)
urlstack = feedparser.parse(url['stackrss'])
def remoteokcall():
print "Remote Jobs from Remoteok.io"
print ""
for item in result:
print 'Post Date:', item['date']
print 'Company Name:', item['company']
print 'Title:', item['position']
print 'Apply Here:', item['url']
print " "
remoteokcall()
def stackrssjobs():
for post in urlstack.entries:
print 'Date: ', post.date
print 'Title: ', post.title
print 'Apply Here: ', post.link
print " "
stackrssjobs()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment