|
|
|
@ -51,7 +51,7 @@ class SpyderController:
|
|
|
|
|
# headers = {
|
|
|
|
|
# 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0'
|
|
|
|
|
# }
|
|
|
|
|
f = open("file_3.csv", "a", encoding="UTF-8", newline="")
|
|
|
|
|
f = open("file_3.csv", "a", encoding="GB18030", newline="")
|
|
|
|
|
csv_writer = csv.writer(f)
|
|
|
|
|
#
|
|
|
|
|
# rank_text = requests.get(url=url, headers=headers).text
|
|
|
|
@ -129,7 +129,7 @@ class SpyderController:
|
|
|
|
|
return all_data_list
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
f = open("file_3.csv", "w", encoding="UTF-8", newline="")
|
|
|
|
|
f = open("file_3.csv", "w", encoding="GB18030", newline="")
|
|
|
|
|
csv_writer = csv.writer(f)
|
|
|
|
|
csv_writer.writerow(
|
|
|
|
|
["bvId", "title", "url", "uploadTime", "topNo", "viewCount", "likeCount", "coinCount",
|
|
|
|
|