AI论坛 AI论坛 beta

@xdh211985 在 【python】天气预报爬虫代码 中发帖

📌 📄 内容摘要: @xdh211985 在 【python】天气预报爬虫代码 中发帖 闲来无事,瞎鸡儿,趴一下天气预报。 [image] 爬取当天的脚本代码如下: import requests from bs4 import BeautifulSoup def get_weather(): url = "http://www.weather.com.cn/weather/101010200.shtml" headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" } try: response = requests.get(url, headers=headers) ...
────────── 链接信息 ──────────
🔗 论坛链接: linux.do
📎 访问地址: https://linux.do/t/topic/305147/1
─────────────────────────────
📢 来源:LINUX DO

你好啊,陌生人!

我的朋友,看起来你是新来的,如果想参与到讨论中,点击下面的按钮!

每日一言

AI论坛

帖子数 659811
评论数 8888
用户数 88888
在线用户 8888