Skip to content

Commit abe76f4

Browse files
committed
format + do not log api-key
1 parent 294a25c commit abe76f4

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

colrev/packages/scopus/src/scopus.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def heuristic(cls, filename: Path, data: str) -> dict:
9595
stripped = line.strip()
9696
if stripped.lower().startswith("url") and "=" in stripped:
9797
candidate_urls.append(
98-
stripped.split("=", maxsplit=1)[1].strip().strip("{}\",")
98+
stripped.split("=", maxsplit=1)[1].strip().strip('{}",')
9999
)
100100
elif stripped.startswith("%U "):
101101
candidate_urls.append(stripped[3:].strip())
@@ -104,10 +104,7 @@ def heuristic(cls, filename: Path, data: str) -> dict:
104104
nr_valid_scopus_urls = 0
105105
for candidate_url in candidate_urls:
106106
parsed_url = urlparse(candidate_url)
107-
if (
108-
parsed_url.scheme == "https"
109-
and parsed_url.hostname == "www.scopus.com"
110-
):
107+
if parsed_url.scheme == "https" and parsed_url.hostname == "www.scopus.com":
111108
nr_valid_scopus_urls += 1
112109

113110
if nr_valid_scopus_urls > 0 and nr_valid_scopus_urls >= nr_items:

colrev/packages/semanticscholar/src/semanticscholar_ui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def get_api_key(self, existing_key: typing.Optional[str] = "") -> str:
248248
return ""
249249

250250
else:
251-
print("\n" + "API key: " + api_key + "\n")
251+
print("\nAPI key configured.\n")
252252
fwd = self.choose_single_option(
253253
msg="Start search with this API key?", options=["YES", "NO"]
254254
)

0 commit comments

Comments
 (0)