Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,7 +114,8 @@ if keyword_id:
|
|
| 114 |
st.error("異なるサイトのURLを入力してください。")
|
| 115 |
st.stop()
|
| 116 |
|
| 117 |
-
subprocess.
|
|
|
|
| 118 |
|
| 119 |
with open("output1.txt", "r", encoding="utf-8") as f:
|
| 120 |
content = f.read()
|
|
@@ -123,7 +124,10 @@ if keyword_id:
|
|
| 123 |
db.upsert({"name": "output1.txt", "content": content, "keyword_id": keyword_id},
|
| 124 |
(Query().name == "output1.txt") & (Query().keyword_id == keyword_id))
|
| 125 |
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
| 127 |
with open("output2.txt", "r", encoding="utf-8") as f:
|
| 128 |
editable_output2 = f.read()
|
| 129 |
soup = BeautifulSoup(editable_output2, "html.parser")
|
|
|
|
| 114 |
st.error("異なるサイトのURLを入力してください。")
|
| 115 |
st.stop()
|
| 116 |
|
| 117 |
+
process = subprocess.Popen(["python3", "first.py", url1, url2, url3])
|
| 118 |
+
process.wait()
|
| 119 |
|
| 120 |
with open("output1.txt", "r", encoding="utf-8") as f:
|
| 121 |
content = f.read()
|
|
|
|
| 124 |
db.upsert({"name": "output1.txt", "content": content, "keyword_id": keyword_id},
|
| 125 |
(Query().name == "output1.txt") & (Query().keyword_id == keyword_id))
|
| 126 |
|
| 127 |
+
with st.spinner("その他の処理を実行中..."):
|
| 128 |
+
process = subprocess.Popen(["python3", "second.py", keyword])
|
| 129 |
+
process.wait()
|
| 130 |
+
|
| 131 |
with open("output2.txt", "r", encoding="utf-8") as f:
|
| 132 |
editable_output2 = f.read()
|
| 133 |
soup = BeautifulSoup(editable_output2, "html.parser")
|