From 1d302172565b53559eed8b2e410c1d208bf15ead Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 4 May 2018 14:14:04 -0700 Subject: [PATCH] The merge proposal page seems to have changed a bit, fix up the script to match the page --- scripts/lp-merge.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/lp-merge.py b/scripts/lp-merge.py index 393cf7e9f..d017821e4 100755 --- a/scripts/lp-merge.py +++ b/scripts/lp-merge.py @@ -94,17 +94,18 @@ def get_merge_info(url): print('Unable to load merge URL: {}'.format(url)) return None soup = BeautifulSoup(page.read(), 'lxml') - # Find this span tag that contains the branch url + # Find the span tag that contains the branch url # span_branch_url = soup.find('span', class_='branch-url') if not span_branch_url: print('Unable to find merge details on URL: {}'.format(url)) return None merge_info['branch_url'] = span_branch_url.contents[0] - # Find this tag that describes the branch. We'll use that for commit message - # - meta = soup.find('meta', attrs={"name": "description"}) - merge_info['commit_message'] = meta.get('content') + # Find the p tag that contains the commit message + #
...
...

+ commit_message = soup.find('div', id='commit-message').find('div', id='edit-commit_message')\ + .find('div', 'yui3-editable_text-text').p + merge_info['commit_message'] = commit_message.string # Find all tr-tags with this class. Makes it possible to get bug numbers. #