没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
import requests
from bs4 import BeautifulSoup
from wxpy import *
from threading import Timer
header = {'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; WOW64) '
}
bot = Bot() # 登陆网页微信,并保存登陆状态
def get_page(url):
url = 'http://www.tianqi.com/zhangjiakou/'
responce = requests.get(url,headers=header)
soup = BeautifulSoup(responce.text,'html.parser')
#print(soup.text)
now_tem = soup.find('p',class_='now').text.split()
weather_tem=soup.find('dd',class_='weather').find('span').text
weather_info = soup.find('dd',class_='shidu').text
weather_info1 = soup.find('dd',class_='kongqi').text
#print(now_tem)
#print(weather_tem)
#print(weather_info)
#print(weather_info1)
weather=weather_tem[0:2]
tem=weather_tem[2:9]
shidu=weather_info[0:6]
wind=weather_info[6:14]
light=weather_info[14:21]
from bs4 import BeautifulSoup
from wxpy import *
from threading import Timer
header = {'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; WOW64) '
}
bot = Bot() # 登陆网页微信,并保存登陆状态
def get_page(url):
url = 'http://www.tianqi.com/zhangjiakou/'
responce = requests.get(url,headers=header)
soup = BeautifulSoup(responce.text,'html.parser')
#print(soup.text)
now_tem = soup.find('p',class_='now').text.split()
weather_tem=soup.find('dd',class_='weather').find('span').text
weather_info = soup.find('dd',class_='shidu').text
weather_info1 = soup.find('dd',class_='kongqi').text
#print(now_tem)
#print(weather_tem)
#print(weather_info)
#print(weather_info1)
weather=weather_tem[0:2]
tem=weather_tem[2:9]
shidu=weather_info[0:6]
wind=weather_info[6:14]
light=weather_info[14:21]
资源评论
winolos
- 粉丝: 1
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功