FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TikTokAPI-Python/tests/test_hashtag.py at master · george-cpp/TikTokAPI-Python · GitHub
george-cpp
/
TikTokAPI-Python
Public
forked from
avilash/TikTokAPI-Python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TikTokAPI-Python
/
tests
/
test_hashtag.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (22 loc) · 793 Bytes
Breadcrumbs
TikTokAPI-Python
/
tests
/
test_hashtag.py
Copy path
File metadata and controls
30 lines (22 loc) · 793 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import
argparse
from
TikTokAPI
import
TikTokAPI
from
utils
import
read_json_from_file
def
getHashTag
(
hashTag
):
api
=
TikTokAPI
(
read_json_from_file
(
"cookie.json"
))
return
api
.
getHashTag
(
hashTag
)
def
getVideosByHashTag
(
hashTag
):
api
=
TikTokAPI
(
read_json_from_file
(
"cookie.json"
))
return
api
.
getVideosByHashTag
(
hashTag
,
count
=
10
)
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
(
description
=
''
)
parser
.
add_argument
(
'--data'
,
dest
=
'data'
,
type
=
str
,
help
=
'hashtag/videos'
)
args
=
parser
.
parse_args
()
var
=
"#fcbarcelona"
if
args
.
data
==
'hashtag'
:
retval
=
getHashTag
(
var
)
print
(
retval
)
elif
args
.
data
==
'videos'
:
retval
=
getVideosByHashTag
(
var
)
print
(
retval
)
else
:
print
(
"Invalid Argument"
)
Back
|
FazBrowse Home
|
New Git URL