fix format
This commit is contained in:
parent
2f3f03bcb1
commit
1ca169aef8
16
.vscode/launch.json
vendored
Normal file
16
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
// 使用 IntelliSense 以得知可用的屬性。
|
||||||
|
// 暫留以檢視現有屬性的描述。
|
||||||
|
// 如需詳細資訊,請瀏覽: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: 目前的檔案",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"justMyCode": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -1,21 +1,18 @@
|
|||||||
import gevent.monkey
|
|
||||||
|
|
||||||
gevent.monkey.patch_all()
|
|
||||||
import csv
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import queue
|
|
||||||
import random
|
|
||||||
import threading
|
|
||||||
import time
|
|
||||||
|
|
||||||
import fake_useragent
|
|
||||||
import requests
|
|
||||||
import yaml
|
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
from progress.spinner import PixelSpinner
|
|
||||||
|
|
||||||
from gettags import get_tags
|
from gettags import get_tags
|
||||||
|
from progress.spinner import PixelSpinner
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
import yaml
|
||||||
|
import requests
|
||||||
|
import fake_useragent
|
||||||
|
import time
|
||||||
|
import threading
|
||||||
|
import random
|
||||||
|
import queue
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
import csv
|
||||||
|
import gevent.monkey
|
||||||
|
gevent.monkey.patch_all()
|
||||||
|
|
||||||
|
|
||||||
with open('set.yaml', 'r') as f:
|
with open('set.yaml', 'r') as f:
|
||||||
@ -31,6 +28,7 @@ allnumbers = []
|
|||||||
allnames = []
|
allnames = []
|
||||||
alltags = []
|
alltags = []
|
||||||
|
|
||||||
|
|
||||||
class gettagonline(threading.Thread):
|
class gettagonline(threading.Thread):
|
||||||
def __init__(self, queue, number):
|
def __init__(self, queue, number):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
@ -55,7 +53,6 @@ class gettagonline(threading.Thread):
|
|||||||
time.sleep(random.uniform(0.5, 1))
|
time.sleep(random.uniform(0.5, 1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set1 = input("請問要使用離線資料嗎?(y/n)(默認為否)")
|
set1 = input("請問要使用離線資料嗎?(y/n)(默認為否)")
|
||||||
if set1 == "y".lower() or set1 == "yes".lower():
|
if set1 == "y".lower() or set1 == "yes".lower():
|
||||||
if not os.path.isfile("tag.json"):
|
if not os.path.isfile("tag.json"):
|
||||||
@ -103,7 +100,6 @@ while True:
|
|||||||
spinner.next()
|
spinner.next()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if set1 == "y".lower() or set1 == "yes".lower():
|
if set1 == "y".lower() or set1 == "yes".lower():
|
||||||
with open('tag.json', 'r') as f:
|
with open('tag.json', 'r') as f:
|
||||||
tagjson = json.load(f)
|
tagjson = json.load(f)
|
||||||
@ -127,7 +123,6 @@ else:
|
|||||||
for t in threads:
|
for t in threads:
|
||||||
t.join()
|
t.join()
|
||||||
|
|
||||||
|
|
||||||
for i in enumerate(allnumbers):
|
for i in enumerate(allnumbers):
|
||||||
table.append([i[1], allnames[i[0]], alltags[i[0]]])
|
table.append([i[1], allnames[i[0]], alltags[i[0]]])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user