Commit e013f6c9 authored by dasunx's avatar dasunx

Scrapper cofigured

parent 7688940a
...@@ -21,9 +21,9 @@ def saveAnswer(ans_id, stackoverflow, videos): ...@@ -21,9 +21,9 @@ def saveAnswer(ans_id, stackoverflow, videos):
if __name__ == "__main__": if __name__ == "__main__":
# title = input("Enter question title: ") # title = input("Enter question title: ")
title = "python django or flask for web development" # sys.argv[1] title = sys.argv[1] # "python django or flask for web development"
tags = ["react"] # sys.argv[2] tags = sys.argv[2] # ["react"]
AUTO_ANS_ID = "60d746076689344694ad9e30" # sys.argv[3] AUTO_ANS_ID = sys.argv[3] # "60d746076689344694ad9e30" #
stack = STOF(title) stack = STOF(title)
ans = stack.searchQuestion() ans = stack.searchQuestion()
...@@ -37,3 +37,5 @@ if __name__ == "__main__": ...@@ -37,3 +37,5 @@ if __name__ == "__main__":
youtube = Youtube(title, tags) youtube = Youtube(title, tags)
videos = youtube.find_videos() videos = youtube.find_videos()
saveAnswer(AUTO_ANS_ID, ans, videos) saveAnswer(AUTO_ANS_ID, ans, videos)
print("WORKED")
sys.stdout.flush()
...@@ -27,4 +27,3 @@ class Youtube: ...@@ -27,4 +27,3 @@ class Youtube:
videos.append(i["link"]) videos.append(i["link"])
print(i["link"]) print(i["link"])
return videos return videos
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
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