Tag:Zifeng

  • Easywechat web page authorization login

    Time:2021-4-3

    Using easywechat to log in to wechat public function __construct ( Request $request = null ){ parent::__construct(); $this->config = [ ‘app_id’ => ‘wx11ca*****98df5’, ‘secret’ => ‘f860284********2d732d0beae9’, //Specifies the type of the result returned by the API call: array (default) / collection / object / raw / custom class name // ‘response_type’ => ‘array’, ‘oauth’ => […]

  • Two ways to upload files from alicloud OSS (local path upload and remote link upload)

    Time:2021-4-2

    Two ways to upload OSS PHP in alicloud Upload via server path Upload through data stream public function ajax_save_pic(){ $ossconfig = [ ‘keyID’ = >’m5lc @ @ @ UZ ‘// your access key ID ‘keysecret’ = >’mxvrx @ @ @ @ btaqkspq ‘, // your access key secret ‘Endpoint’ => ‘ http://oss-cn-shenzhen.aliyuncs.com ‘// Alibaba cloud […]

  • Click Submit Form

    Time:2021-3-30

    <form action=”/search” id=”search_form”> <input type=”text” name=”keywords” value=”” placeholder=”Furniture Handles” class=”jhser” /> <span class=”serBtn” onclick=”document:search_form.submit();”>Search</span> </form> Form gives an ID search_ formThen click on the price event onclick=“ document:search_ form.submit ();” High value background management system is free to use. Zifeng background management system can be directly installed on the pagoda panel Welcome to my official […]

  • Applet to get unionid

    Time:2021-3-9

    Official account and applet bind WeChat open platform Wechat open platform needs certification (300) Then the relevant binding is carried out. When binding, the original manager of the relevant account is required to scan the code The same is true for applets The applet gets the unionid <button hidden=”{{is_login}}” class=’bottom’ type=’primary’ open-type=”getUserInfo” lang=”zh_CN” bindgetuserinfo=”bindGetUserInfo” style=’width:100px’> […]

  • OpenID binding between small program and official account

    Time:2021-3-8

    Get the openid of the applet through the applet login <button hidden=”{{is_login}}” class=’bottom’ type=’primary’ open-type=”getUserInfo” lang=”zh_CN” bindgetuserinfo=”bindGetUserInfo” style=’width:100px’> Log in to < / button > bindGetUserInfo: function (e) { if (e.detail.userInfo) { //The user pressed the allow authorization button var that = this; //Insert the relevant information of the logged in user into the database […]

  • Binding small programs and official account (through open platform)

    Time:2021-3-4

    Apply for open platform, and bind official account and applet. The applet is authorized to log in and get the unionid When the official account is concerned, get unnionID and query whether unionID exists, then exist, update official account openid information, and there is no new one. Reference documents: Official account No. unionID mechanism: https://developers.weixin.qq…. […]

  • Small program upload post (wechat verification with text and image)

    Time:2021-2-10

    public.js var graceJS = require(‘../../utils/grace.js’); import { config } from ‘../../config.js’ Page({ /** *The initial data of the page */ data: { imglist: [], title:”, content:”, }, delImg(e) { let index = e.currentTarget.dataset.index; let array = []; console.log(index); for (var i = 0; i < this.data.imglist.length; i++) { if (i !== index) { array.push(this.data.imglist[i]) } […]

  • Applet access content content review interface (picture and text)

    Time:2020-12-18

    I don’t know what happened today when I used easywechat’s content security API. I didn’t know if it was due to upgrade or other conflicts, What should I do? I still use the native interface. The token method I get here is still in the way of easywechat $miniProgram = ZFac::miniProgram($this->config); $token = $miniProgram->access_token->getToken()[‘access_token’]; The […]

  • Python collects beautiful girl

    Time:2020-12-5

    import requests; import re; import os; #1. Request web page header = { “user-agent”:’Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36′ } response = requests.get(‘https://www.vmgirls.com/2957.html’,headers=header) # print(response.text) html = response.text #2. Parsing web pages urls = re.findall(‘<img .*?data-pagespeed-lsc-url=”(.*?)”.*?>’,html) dir_name = re.findall(‘<h1 class=”post-title h3″>(.*?)</h1>’,html); dir_name = dir_name[0] if not os.path.exists(dir_name): os.mkdir(dir_name) […]

  • Python collects the map and XPath

    Time:2020-12-4

    import requests;import re;import os;import parsel; 1. Request web page header = { “user-agent”:’Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36′ }response = requests.get(‘https://www.doutula.com/photo…’,headers=header)html = response.text 2. Parsing web pages selector = parsel.Selector(html) print(selector) dir_name = ‘doutu_list’if not os.path.exists(dir_name): os.mkdir(dir_name) result_list = selector.xpath(‘//a[@class=”col-xs-6 col-sm-3″]’)for result in result_list: title = result.xpath(‘./img/@alt’).get() img_url […]

  • Python collection bucket diagram (multithreading)

    Time:2020-12-3

    import concurrent import requests; from concurrent.futures import ThreadPoolExecutor import os; import parsel; def send_request(url): header = { “user-agent”:’Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36′ } requests.packages.urllib3.disable_warnings() response = requests.get(url,headers=header) return response def pare_data(data): selector = parsel.Selector(data) result_list = selector.xpath(‘//a[@class=”col-xs-6 col-sm-3″]’) for result in result_list: title = result.xpath(‘./img/@alt’).get() src_url = […]

  • Authorized login of easywechat

    Time:2020-9-15

    Using easywechat to login wechat public function __construct ( Request $request = null ){ parent::__construct(); $this->config = [ ‘app_id’ => ‘wx11ca*****98df5’, ‘secret’ => ‘f860284********2d732d0beae9’, //Specifies the type of return result of API call: array (default) / collection / object / raw / custom class name // ‘response_type’ => ‘array’, ‘oauth’ => [ ‘scopes’ => [‘snsapi_userinfo’], […]