问题
I'm developing FreedomSponsors - a crowdfunding platform for open source projects.
I want to improve the "Sponsor new issue" screen by pre-filling some information, based on the issue's URL.
My first "target" is JIRA. Given a URL like https://hibernate.onjira.com/browse/HHH-1050, What's the best way to extract information like:
- issue key: HHH-1050
- project issue tracker URL: https://hibernate.onjira.com/browse/HHH
(ok, the first two are easy)
- issue title: "HQL Unions"
- project title: "Hibernate ORM"
I'm using python
回答1:
I'd use the XML view, which is probably (a) more stable than the HTML rendering and (b) easier to extract information from.
At least for this issue tracker at this location you can get the XML URL
https://hibernate.onjira.com/si/jira.issueviews:issue-xml/HHH-1050/HHH-1050.xml
from the issue key which is easily obtainable from the original issue URL.
来源:https://stackoverflow.com/questions/11596405/what-is-the-best-strategy-to-extract-information-from-a-jira-issue