get the URL that your issue is created at
(params)
| 131 | |
| 132 | |
| 133 | def find_url(params): |
| 134 | """ |
| 135 | get the URL that your issue is created at |
| 136 | """ |
| 137 | searches = ( |
| 138 | "https://github.com/NullArray/AutoSploit/issues", |
| 139 | "https://github.com/NullArray/AutoSploit/issues?q=is%3Aissue+is%3Aclosed" |
| 140 | ) |
| 141 | for search in searches: |
| 142 | retval = "https://github.com{}" |
| 143 | href = None |
| 144 | searcher = re.compile(params, re.I) |
| 145 | req = requests.get(search) |
| 146 | status, html = req.status_code, req.content |
| 147 | if status == 200: |
| 148 | split_information = str(html).split("\n") |
| 149 | for i, line in enumerate(split_information): |
| 150 | if searcher.search(line) is not None: |
| 151 | href = split_information[i] |
| 152 | if href is not None: |
| 153 | soup = BeautifulSoup(href, "html.parser") |
| 154 | for item in soup.findAll("a"): |
| 155 | link = item.get("href") |
| 156 | return retval.format(link) |
| 157 | return None |
| 158 | |
| 159 | |
| 160 | def hide_sensitive(): |
no test coverage detected