Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-155
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-155
2021-155
Commits
e013f6c9
Commit
e013f6c9
authored
Jul 01, 2021
by
dasunx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scrapper cofigured
parent
7688940a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
backend/python/auto-answer/scrapper.py
backend/python/auto-answer/scrapper.py
+5
-3
backend/python/auto-answer/youtube.py
backend/python/auto-answer/youtube.py
+0
-1
backend/requirements.txt
backend/requirements.txt
+10
-0
No files found.
backend/python/auto-answer/scrapper.py
View file @
e013f6c9
...
...
@@ -21,9 +21,9 @@ def saveAnswer(ans_id, stackoverflow, videos):
if
__name__
==
"__main__"
:
# title = input("Enter question title: ")
title
=
"python django or flask for web development"
# sys.argv[1]
tags
=
[
"react"
]
# sys.argv[2
]
AUTO_ANS_ID
=
"60d746076689344694ad9e30"
# sys.argv[3]
title
=
sys
.
argv
[
1
]
# "python django or flask for web development"
tags
=
sys
.
argv
[
2
]
# ["react"
]
AUTO_ANS_ID
=
sys
.
argv
[
3
]
# "60d746076689344694ad9e30" #
stack
=
STOF
(
title
)
ans
=
stack
.
searchQuestion
()
...
...
@@ -37,3 +37,5 @@ if __name__ == "__main__":
youtube
=
Youtube
(
title
,
tags
)
videos
=
youtube
.
find_videos
()
saveAnswer
(
AUTO_ANS_ID
,
ans
,
videos
)
print
(
"WORKED"
)
sys
.
stdout
.
flush
()
backend/python/auto-answer/youtube.py
View file @
e013f6c9
...
...
@@ -27,4 +27,3 @@ class Youtube:
videos
.
append
(
i
[
"link"
])
print
(
i
[
"link"
])
return
videos
backend/requirements.txt
0 → 100644
View file @
e013f6c9
bson==0.5.10
beautifulsoup4==4.9.3
dnspython==2.1.0
lxml==4.6.1
pymongo==3.11.4
regex==2020.7.14
requests==2.24.0
requests-html==0.10.0
scipy==1.5.4
youtube-search-python==1.4.6
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