The specs the rendered core spec's "External specifications" section links to, without fragments.
(spec_html)
| 205 | |
| 206 | |
| 207 | def external_spec_urls(spec_html): |
| 208 | """The specs the rendered core spec's "External specifications" section links to, without fragments.""" |
| 209 | section = re.search(r'id="external-specifications".*?<ol>(.*?)</ol>', spec_html, re.DOTALL) |
| 210 | if not section: |
| 211 | raise RuntimeError("Could not find the External specifications list in the rendered WebDriver BiDi spec") |
| 212 | urls = [href.split("#")[0] for href in re.findall(r'href="(https?://[^"]+)"', section.group(1))] |
| 213 | if not urls: |
| 214 | raise RuntimeError("The External specifications list in the rendered WebDriver BiDi spec has no links") |
| 215 | return urls |
| 216 | |
| 217 | |
| 218 | def spec_urls(entry): |