• 大小: 0.37M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-03
  • 语言: Python
  • 标签: wechat  chat  爬虫  

资源简介


资源截图

代码片段和文件信息

import json
from bs4 import BeautifulSoup
from flask import Flaskrender_templatesessionjsonifyrequest
import time re
import requests

app = Flask(__name__)
app.secret_key=‘134‘

def xml_parse(arg):
    soup= BeautifulSoup(arg ‘html.parser‘)
    tag_list = soup.find(name=‘error‘).find_all()
    res = {}
    for tag in tag_list:
        res[tag.name] = tag.text
    return res

@app.route(‘/login‘)
def login():
    ctime = int(time.time()*1000)
    qcode_url = ‘https://login.wx.qq.com/jslogin?appid=wx782c26e4c19acffb&redirect_uri=https%3A%2F%2Fwx.qq.com%2Fcgi-bin%2Fmmwebwx-bin%2Fwebwxnewloginpage&fun=new&lang=zh_CN&_={0}‘.format(ctime)
    rep = requests.get(
        url=qcode_url
    )
    # print(rep.text)  # window.QRLogin.code = 200; window.QRLogin.uuid = “Qfq90M3SgA==“;
    qcode = re.findall(‘uuid = “(.*)“;‘ rep.text)[0]
    session[‘qcode‘] = qcode
    return render_template(‘login.html‘ qcode=qcode)

@app.route(‘/check/login‘)
def check_log():

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-04-08 11:30  s9day124_wechat\
     目录           0  2020-04-09 09:14  s9day124_wechat\.idea\
     目录           0  2020-04-07 08:55  s9day124_wechat\.idea\inspectionProfiles\
     文件         174  2020-04-07 08:55  s9day124_wechat\.idea\inspectionProfiles\profiles_settings.xml
     文件         312  2020-04-07 08:55  s9day124_wechat\.idea\misc.xml
     文件         289  2020-04-07 08:55  s9day124_wechat\.idea\modules.xml
     文件         408  2020-04-07 08:55  s9day124_wechat\.idea\s9day124_wechat.iml
     文件        9228  2020-04-09 09:14  s9day124_wechat\.idea\workspace.xml
     目录           0  2020-06-19 09:13  s9day124_wechat\Include\
     目录           0  2020-04-07 08:53  s9day124_wechat\Lib\
     目录           0  2020-06-19 09:13  s9day124_wechat\Lib\site-packages\
     目录           0  2020-04-07 08:53  s9day124_wechat\scripts\
     文件        1504  2020-04-07 08:53  s9day124_wechat\scripts\Activate.ps1
     文件        2303  2020-04-07 08:53  s9day124_wechat\scripts\activate
     文件        1033  2020-04-07 08:53  s9day124_wechat\scripts\activate.bat
     文件         368  2020-04-07 08:53  s9day124_wechat\scripts\deactivate.bat
     文件      415760  2020-04-07 08:53  s9day124_wechat\scripts\python.exe
     文件      414736  2020-04-07 08:53  s9day124_wechat\scripts\pythonw.exe
     文件        5043  2020-04-08 11:17  s9day124_wechat\app.py
     文件          81  2020-04-07 08:53  s9day124_wechat\pyvenv.cfg
     目录           0  2020-06-19 09:13  s9day124_wechat\static\
     目录           0  2020-04-08 10:14  s9day124_wechat\templates\
     文件         509  2020-04-08 10:11  s9day124_wechat\templates\contact_list.html
     文件         768  2020-04-08 09:23  s9day124_wechat\templates\index.html
     文件        1116  2020-04-08 09:40  s9day124_wechat\templates\login.html
     文件         409  2020-04-08 10:14  s9day124_wechat\templates\send_msg.html
     文件         486  2020-04-08 11:30  s9day124_wechat\utils.py
     文件         382  2020-04-08 08:46  s9day124_wechat\响应头和响应体.py
     文件         622  2020-04-08 10:42  s9day124_wechat\序列化.py

评论

共有 条评论