Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
network-assets-reptile
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
network-assets-reptile
Commits
829e9421
Commit
829e9421
authored
Jul 12, 2023
by
liyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:爬取youtube
parent
f066fdea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
index.py
utils/index.py
+2
-1
No files found.
utils/index.py
View file @
829e9421
...
...
@@ -26,7 +26,8 @@ def convert_string_to_time(string):
weeks
=
int
(
string
.
split
(
"周前"
)[
0
])
converted_time
=
current_time
-
timedelta
(
weeks
=
weeks
)
elif
"月前"
in
string
:
months
=
int
(
string
.
split
(
"月前"
)[
0
])
cleaned_string
=
re
.
sub
(
r'\D'
,
''
,
string
.
split
(
"月前"
)[
0
])
months
=
int
(
cleaned_string
)
converted_time
=
current_time
-
timedelta
(
days
=
months
*
30
)
elif
"年前"
in
string
:
years
=
int
(
string
.
split
(
"年前"
)[
0
])
...
...
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