(url: str, ext: str)
| 22 | |
| 23 | |
| 24 | def is_github_src(url: str, ext: str) -> bool: |
| 25 | if not is_url(url): |
| 26 | return False |
| 27 | |
| 28 | hostname = urllib.parse.urlparse(url).hostname |
| 29 | if hostname != "github.com" and hostname != "raw.githubusercontent.com": |
| 30 | return False |
| 31 | path: str = urllib.parse.urlparse(url).path |
| 32 | return path.endswith(ext) |
| 33 | |
| 34 | |
| 35 | def get_github_src_url(url: str) -> str: |
searching dependent graphs…