Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-118
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021_118- Gazette
2021-118
Commits
3d44bf03
Commit
3d44bf03
authored
Nov 26, 2021
by
ChamendiPabasara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gazette Scrape Updated
parent
5f0b6e57
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
cgp1/CgpApp/views.py
cgp1/CgpApp/views.py
+4
-2
No files found.
cgp1/CgpApp/views.py
View file @
3d44bf03
...
@@ -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
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment