Skip to content

Commit

Permalink
moved dummy elsevier api key to env
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Mar 14, 2024
1 parent 3f60c38 commit c439b61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ai_ta_backend/journal_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# Below functions hit API endpoints from sites like arXiv, Elsevier, and Sringer Nature to retrieve journal articles
SPRINGER_API_KEY = os.environ.get('SPRINGER_API_KEY')
ELSEVIER_API_KEY = os.environ.get('ELSEVIER_API_KEY')
ELSEVIER_TEST_API_KEY = os.environ.get('ELSEVIER_TEST_API_KEY')

SUPABASE_CLIENT = supabase.create_client( # type: ignore
supabase_url=os.getenv('SUPABASE_URL'), # type: ignore
Expand Down Expand Up @@ -478,7 +479,7 @@ def searchScienceDirectArticles(course_name: str, search_str: str, article_title
url = "https://api.elsevier.com/content/search/sciencedirect"

#headers = {'X-ELS-APIKey': ELSEVIER_API_KEY, 'Accept':'application/json'}
headers = {'X-ELS-APIKey': "7f59af901d2d86f78a1fd60c1bf9426a", 'Accept':'application/json'}
headers = {'X-ELS-APIKey': ELSEVIER_TEST_API_KEY, 'Accept':'application/json'}
response = requests.put(url, headers=headers, json=data)

if response.status_code != 200:
Expand Down

0 comments on commit c439b61

Please sign in to comment.