Skip to content

Commit

Permalink
Merge pull request #36 from sot/acq-stats
Browse files Browse the repository at this point in the history
Update AcqStatReportsPage
  • Loading branch information
javierggt authored Dec 30, 2024
2 parents 117de2c + 0016491 commit dd31b50
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions twiki_wg/ssawg_trending_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ def parse_page(self):
self.ems = get_elements(self.soup, "em")
self.scripts = get_elements(self.soup, "script")
self.images = get_images(self.soup, "img", self.url)
if self.page == "acq_stat_reports":
self.current_quarter_acq_images = get_images(
self.soup, "img", self.current_url
)

self.tables = get_tables(self.soup, "table", self.url)

def get_page_request(self):
Expand Down Expand Up @@ -208,18 +203,18 @@ def get_url(self):
raise RuntimeError(f"failed to find URL for {self.page}")


class AcqStatReportsPage(ReportsPage):
class AcqStatReportsPage(GenericPage):
page = "acq_stat_reports"

def get_html_chunks(self):
html_chunks = [
self.headers2[0],
self.url_html,
self.headers3[0],
self.tables[1],
self.current_quarter_acq_images["id_acq_stars.png"],
self.images["delta_mag_scatter.png"],
self.tables[4],
self.headers3[1],
self.images["quarter/id_acq_stars.png"],
self.images["quarter/fail_rate_plot.png"],
self.images["quarter/fail_rate_plot_borderline.png"],
self.images["quarter/mag_pointhist.png"],
"<hr>",
]
return html_chunks
Expand Down

0 comments on commit dd31b50

Please sign in to comment.