Python:刮取吉拉 [英] Python: Scraping Jira

查看:82
本文介绍了Python:刮取吉拉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个脚本,该脚本根据我在Jira中设置的过滤器从Jira抓取信息.目前,它仅打印密钥,但是如何打印摘要和状态?

I have a script which scrapes info from Jira based on the filters I set up in Jira. Currently it just prints the Key, but how do I print the summary and status?

我希望它们能并排出现.

I would like they to appear along side each other.

谢谢!

到目前为止,这是我的代码:

Here is my code so far:

# coding=utf-8

from jira.client import JIRA
options = {'server': 'https://jira.blank.com/'}
jira = JIRA(options, basic_auth=('blank', 'blank'))

for i in jira.search_issues('filter=14270', maxResults=150):
print i

推荐答案

要打印摘要和状态,只需调用这些字段,如下所示:

To print the summary and status simply call those fields as illustrated below:

for i in jira.search_issues('filter=14270', maxResults=150):

    issue=i
    print issue.fields.summary
    print issue.fields.status

这篇关于Python:刮取吉拉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆