Commit 3d44bf03 authored by ChamendiPabasara's avatar ChamendiPabasara

Gazette Scrape Updated

parent 5f0b6e57
...@@ -58,7 +58,7 @@ nltk.download('punkt') ...@@ -58,7 +58,7 @@ nltk.download('punkt')
dotenv.load_dotenv() dotenv.load_dotenv()
#Scraping function
def scrape(): def scrape():
x = 0 x = 0
gz_url = '' gz_url = ''
...@@ -126,7 +126,8 @@ def scrape(): ...@@ -126,7 +126,8 @@ def scrape():
except: except:
print(traceback.print_exc()) print(traceback.print_exc())
# get last friday
# get last friday from calender
lastFriday = datetime.date.today() lastFriday = datetime.date.today()
oneday = datetime.timedelta(days=1) oneday = datetime.timedelta(days=1)
while lastFriday.weekday() != calendar.FRIDAY: while lastFriday.weekday() != calendar.FRIDAY:
...@@ -137,6 +138,7 @@ def scrape(): ...@@ -137,6 +138,7 @@ def scrape():
print("month :", datee.month) print("month :", datee.month)
print("date: ", datee) print("date: ", datee)
##################################################### #####################################################
def _get_date(): def _get_date():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment