We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3c14a4a + bab21fe commit 5654661Copy full SHA for 5654661
third_party_license_file_generator/licenses/__init__.py
@@ -115,7 +115,8 @@ def get_license_from_pypi_license_scrape(module_name):
115
if r.status_code != 200:
116
return None
117
118
- return r.text.split("<p><strong>License:</strong>")[-1].split("</p>")[0].strip().split("\n")[0]
+ match = re.search("License:</.+>([^<]+)", r.text)
119
+ return match.group(1).strip() if match is not None else None
120
121
122
def get_license_from_github_home_page_scrape(url):
0 commit comments