Skip to content

Commit

Permalink
added tracking github repos
Browse files Browse the repository at this point in the history
  • Loading branch information
jkmin3 committed Sep 27, 2023
1 parent cb79daf commit 9845fa2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ai_ta_backend/web_scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ def remove_falses(self):


def check_and_ingest(self, url:str, course_name:str, timeout:int, base_url_on:str):
if is_github_repo(url):
print("Found GitHub repo, ingesting")
self.ingester.ingest_github(url, course_name)
print("Finished ingesting GitHub page")
return '', '', ''

if url not in self.invalid_urls and url not in self.existing_urls:
second_url, content, filetype = self.valid_url(url)
else:
Expand Down Expand Up @@ -445,7 +451,7 @@ def main_crawler(self, url:str, course_name:str, max_urls:int=100, max_depth:int
base_url_str = ''

# Check for GitHub repository coming soon
if url.startswith("https://github.com/"):
if is_github_repo(url):
print("Begin Ingesting GitHub page")
results = self.ingester.ingest_github(url, course_name)
print("Finished ingesting GitHub page")
Expand Down

0 comments on commit 9845fa2

Please sign in to comment.