Update getdata.py

master
p2tfsuw8f 3 years ago
parent 9cdff12a6b
commit 8b7b133be7

@ -0,0 +1,13 @@
import csv
import requests
import re, os
from bs4 import BeautifulSoup
url = ' https://mp.weixin.qq.com/s/K0u_qPFQtWuH4hk5K2xWfQ'
response = requests.get(url)
response.encoding = response.apparent_encoding
response.encoding = 'utf-8'
html = response.text
soup = BeautifulSoup(html, 'html.parser')
ans = soup.select('div.rich_media > div.rich_media_inner ')
ans1 = ans[0].text.encode()
Loading…
Cancel
Save