fix format

This commit is contained in:
phillychi3 2023-03-12 13:18:25 +08:00
parent 2f3f03bcb1
commit 1ca169aef8
2 changed files with 45 additions and 34 deletions

16
.vscode/launch.json vendored Normal file
View 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
}
]
}

View File

@ -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 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:
@ -31,6 +28,7 @@ allnumbers = []
allnames = []
alltags = []
class gettagonline(threading.Thread):
def __init__(self, queue, number):
threading.Thread.__init__(self)
@ -55,7 +53,6 @@ class gettagonline(threading.Thread):
time.sleep(random.uniform(0.5, 1))
set1 = input("請問要使用離線資料嗎?(y/n)(默認為否)")
if set1 == "y".lower() or set1 == "yes".lower():
if not os.path.isfile("tag.json"):
@ -103,7 +100,6 @@ while True:
spinner.next()
if set1 == "y".lower() or set1 == "yes".lower():
with open('tag.json', 'r') as f:
tagjson = json.load(f)
@ -127,7 +123,6 @@ else:
for t in threads:
t.join()
for i in enumerate(allnumbers):
table.append([i[1], allnames[i[0]], alltags[i[0]]])