summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-10-20 13:18:52 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-10-21 08:52:26 +0200
commitda39ae24711110edac28a65c3a01ddb49a810bec (patch)
tree1fa71c19e5d9abd8e5625c82a82f6106ee0547ea /bin
parent77131a5277f52300319f7cc5f8c2cc8b4d600a7c (diff)
crashreportScraper: Also get info about the last 4 uno commands
it can be useful Change-Id: I8e709775814922c2623350de1de2fe647d7deadd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141556 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/crashreportScraper.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/crashreportScraper.py b/bin/crashreportScraper.py
index 7d57ab1f747b..54477f6c4c28 100755
--- a/bin/crashreportScraper.py
+++ b/bin/crashreportScraper.py
@@ -162,7 +162,14 @@ def parse_details_and_get_info(url, gitRepo):
#multiline
codeLine = "\"" + codeLine + "\""
- return reason, stack, codeLine
+ metadata = soup.find("div", {"id": "metadata"}).tbody
+ tr_list = metadata.find_all("tr")
+ unoCommands = ""
+ for tr in tr_list:
+ if tr.th.text.strip() == "Last-4-Uno-Commands":
+ unoCommands = tr.td.text.strip()
+
+ return reason, stack, codeLine, unoCommands
if __name__ == '__main__':
@@ -195,7 +202,7 @@ if __name__ == '__main__':
with open(fileName, "a") as f:
if bInsertHeader:
line = '\t'.join(["Name", "Count", "First report", "Last Report",
- "ID", "Version", "Reason", "OS", "Stack", "Code Lines" '\n'])
+ "ID", "Version", "Reason", "OS", "Stack", "Code Lines", "Last 4 UNO Commands", '\n'])
f.write(line)
f.flush()
@@ -205,10 +212,10 @@ if __name__ == '__main__':
try:
crashCount, crashID, crashVersion, crashOS = parse_reports_and_get_most_recent_report_from_last_page(
"https://crashreport.libreoffice.org/stats/signature/" + urllib.parse.quote(k))
- crashReason, crashStack, codeLine = parse_details_and_get_info(
+ crashReason, crashStack, codeLine, unoCommands = parse_details_and_get_info(
"https://crashreport.libreoffice.org/stats/crash_details/" + crashID, args.repository)
line = '\t'.join([k, str(crashCount), lDate[1], lDate[2],
- crashID, crashVersion, crashReason, crashOS, crashStack, codeLine, '\n'])
+ crashID, crashVersion, crashReason, crashOS, crashStack, codeLine, unoCommands, '\n'])
f.write(line)
f.flush()
except (requests.exceptions.Timeout, AttributeError):