Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Make a query for 'flask' return CPE for THE Flask
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1nb0rn committed Feb 20, 2024
1 parent d3a5400 commit 46d9c49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpe_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ def _get_alternative_queries(init_queries):
if 'bootstrap' in query and 'getbootstrap' not in query:
alt_queries_mapping[query].append(query + ' getbootstrap')

# fix that a query for Flask probably means THE flask
if 'flask' in query and 'palletsprojects' not in query:
alt_queries_mapping[query].append(query + ' palletsprojects')

# check for different variants of js library names, e.g. 'moment.js' vs. 'momentjs' vs. 'moment js'
query_words = query.split()
if 'js ' in query or ' js' in query or query.endswith('js'):
Expand Down

0 comments on commit 46d9c49

Please sign in to comment.