随笔分类 -  python

摘要:import requests import bs4 from selenium.webdriver.common.by import By import pandas as pd driverPath = "C:\Program Files (x86)\Microsoft\Edge\Applica 阅读全文
posted @ 2024-03-20 19:48 子过杨梅 阅读(9) 评论(0) 推荐(0) 编辑
摘要:def extract_number(filename): # 提取文件名中的数字部分 return int(''.join(filter(str.isdigit, filename))) target_list = sorted(os.listdir(path),key=extract_numbe 阅读全文
posted @ 2023-11-28 20:16 子过杨梅 阅读(141) 评论(0) 推荐(0) 编辑
摘要:import sys import msvcrt import threading import time import map import os import player global go_to,fresh_time go_to="s" fresh_time=0.1 def stop(x,y 阅读全文
posted @ 2023-08-09 11:34 子过杨梅 阅读(20) 评论(0) 推荐(0) 编辑
摘要:def get_GD(location): url='https://restapi.amap.com/v3/assistant/coordinate/convert?' key='208ce530fdd2dc162c8831657fff3232' link='{}locations={}&coor 阅读全文
posted @ 2023-07-30 17:32 子过杨梅 阅读(90) 评论(0) 推荐(0) 编辑
摘要:def get_dis_tm(origin, destination): url = 'https://restapi.amap.com/v3/direction/driving?' key = '208ce530fdd2dc162c8831657fff3232' #这里就是需要去高德开放平台去申请 阅读全文
posted @ 2023-07-26 19:49 子过杨梅 阅读(65) 评论(0) 推荐(0) 编辑
摘要:import requests import bs4 import Mysql import time import pymysql db = pymysql.connect(host="localhost",port=3306,user='root',password='Njx200259',db 阅读全文
posted @ 2023-07-21 12:37 子过杨梅 阅读(53) 评论(0) 推荐(0) 编辑
摘要:import requests import bs4 url="https://ditu.amap.com/service/regeo?longitude=114.538985&latitude=38.047186" params = { "longitude": "114.538985", "la 阅读全文
posted @ 2023-07-19 23:50 子过杨梅 阅读(18) 评论(0) 推荐(0) 编辑
摘要:import requests import re import bs4 import pandas as pd import csv a = [] url = "http://www.tianqihoubao.com/lishi/shijiazhuang/month/202004.html" r 阅读全文
posted @ 2023-07-19 23:49 子过杨梅 阅读(22) 评论(0) 推荐(0) 编辑
摘要:class UrlManager(): #url管理器 def __init__():#设置新老url数组,分别为未爬取和已爬取 self.new_urls = set() self.old_urls = set() def add_new_url(self,url):#添加单个url if url 阅读全文
posted @ 2023-07-17 14:33 子过杨梅 阅读(37) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示