Skip to content

Commit

Permalink
Patch link generation for RHJobs feed
Browse files Browse the repository at this point in the history
  • Loading branch information
iranzo committed Feb 23, 2018
1 parent 5f2cc58 commit 440fea8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions stampy/plugin/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import stampy.plugin.karma
import stampy.plugin.stats
import stampy.stampy
import re
from stampy.i18n import _
from stampy.i18n import _L

Expand Down Expand Up @@ -311,6 +312,12 @@ def feeds(message=False, name=False):
url = False
title = False

# Patch RHJobs feed
if name == "RHJobs":
description = item['description']
jobid = re.search('\*\*Job ID\*\*(.*)', description).group(1).strip().replace("_", '')
url = "https://global-redhat.icims.com/jobs/%s/job?iis=A+Red+Hat+Employee&iispid=21098" % jobid

if url and title:
dateitem = stampy.stampy.utize(dateutil.parser.parse(item["published"]))
dateitemfor = dateitem.strftime('%Y/%m/%d %H:%M:%S')
Expand Down

0 comments on commit 440fea8

Please sign in to comment.