Update app.py
Browse files
app.py
CHANGED
|
@@ -16,12 +16,6 @@ filename="urls"
|
|
| 16 |
filename2="pages"
|
| 17 |
|
| 18 |
|
| 19 |
-
def mega():
|
| 20 |
-
with open("./seed.txt") as f:
|
| 21 |
-
this = f.readlines()
|
| 22 |
-
f.close()
|
| 23 |
-
for ea in this:
|
| 24 |
-
print(ea)
|
| 25 |
|
| 26 |
def init(filename=filename,save_data=save_data):
|
| 27 |
#if filename==None:
|
|
@@ -418,6 +412,15 @@ def sitemap_OG(url,level):
|
|
| 418 |
except Exception as e:
|
| 419 |
print (e)
|
| 420 |
return link1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
with gr.Blocks() as app:
|
| 422 |
file_state=gr.State()
|
| 423 |
with gr.Row():
|
|
@@ -431,6 +434,6 @@ with gr.Blocks() as app:
|
|
| 431 |
outp=gr.JSON()
|
| 432 |
with gr.Column(scale=1):
|
| 433 |
outmap=gr.JSON()
|
| 434 |
-
test_btn.click(
|
| 435 |
btn.click(sitemap,[inp,file_state,level],[outp,outmap,key_json])
|
| 436 |
app.launch()
|
|
|
|
| 16 |
filename2="pages"
|
| 17 |
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
def init(filename=filename,save_data=save_data):
|
| 21 |
#if filename==None:
|
|
|
|
| 412 |
except Exception as e:
|
| 413 |
print (e)
|
| 414 |
return link1
|
| 415 |
+
|
| 416 |
+
def test():
|
| 417 |
+
with open("./seed.txt") as f:
|
| 418 |
+
this = f.readlines()
|
| 419 |
+
f.close()
|
| 420 |
+
for ea in this:
|
| 421 |
+
print(ea)
|
| 422 |
+
a,b = sitemap(ea,None,8)
|
| 423 |
+
|
| 424 |
with gr.Blocks() as app:
|
| 425 |
file_state=gr.State()
|
| 426 |
with gr.Row():
|
|
|
|
| 434 |
outp=gr.JSON()
|
| 435 |
with gr.Column(scale=1):
|
| 436 |
outmap=gr.JSON()
|
| 437 |
+
test_btn.click(test,None,None)
|
| 438 |
btn.click(sitemap,[inp,file_state,level],[outp,outmap,key_json])
|
| 439 |
app.launch()
|