MCPcopy
hub / github.com/NullArray/AutoSploit / find_url

Function find_url

lib/creation/issue_creator.py:133–157  ·  view source on GitHub ↗

get the URL that your issue is created at

(params)

Source from the content-addressed store, hash-verified

131
132
133def 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
160def hide_sensitive():

Callers 1

request_issue_creationFunction · 0.85

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected