Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
akanksha1131 committed Apr 20, 2024
1 parent d780d84 commit 68d18ce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Run Scripts
on:
schedule:
# Run newday.py every day.
- cron: '3 13 * * *'
- cron: '52 13 * * *'
# Run update_BoW.py every day
- cron: '45 13 * * *'
- cron: '20 14 * * *'

jobs:
build:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
run: python project/newday.py

- name: Execute update_BoW.py (every day)
if: ${{ github.event_name == 'schedule' && github.event.cron == '25 13 * * *' }}
if: ${{github.event.cron == '25 13 * * *' }}
run: python update_BoW.py

- name: Commit files
Expand Down
2 changes: 1 addition & 1 deletion project/main2.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def categorize_articles(all_links):
visited_links[link] = domain
print(link, " is ", domain)
except Exception as e:
print(f"Error downloading article from {link}: {e}")
print(f"Error downloading article from {link}: {e}\n")
continue # Continue with the next iteration of the loop

# Separate links based on their domains
Expand Down
2 changes: 1 addition & 1 deletion project/newday.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import nltk
from pathlib import Path
nltk.download('punkt')

nltk.download('stopwords')
csv_folder = Path(__file__).resolve().parent # Get the directory of the script
files = [
csv_folder/'india.csv',
Expand Down
1 change: 1 addition & 0 deletions update_BoW.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from pathlib import Path

nltk.download('punkt')
nltk.download('stopwords')
# Get the directory of the script
csv_folder = Path(__file__).resolve().parent

Expand Down

0 comments on commit 68d18ce

Please sign in to comment.