吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 207|回复: 5
收起左侧

[资源求助] 求一个论坛的云签到函数脚本。

[复制链接]
939709 发表于 2024-5-8 19:58
200吾爱币
根据其他论坛的签到函数改的,但是好像没有用,有大佬帮我改一下吗?
签到函数.txt (1.26 KB, 下载次数: 5)



最佳答案

查看完整内容

[md] ```python # -*- coding: utf8 -*- import pyhttpx from bs4 import BeautifulSoup def main(*args): headers={ 'Cookie':'Your Cookie here' 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.81', 'ContentType':'text/html;charset=gbk' } sess = pyhttpx.HttpSessi ...

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

cattie 发表于 2024-5-8 19:58
939709 发表于 2024-5-9 09:34
里面有地址。能帮忙弄一下不
# -*- coding: utf8 -*-
import pyhttpx 
from bs4 import BeautifulSoup

def main(*args):
    headers={
        'Cookie':'Your Cookie here'
        'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.81',
        'ContentType':'text/html;charset=gbk'
    }
    sess = pyhttpx.HttpSession(browser_type='chrome', http2=True)
    html = BeautifulSoup(sess.get('https://jietiandi.net/plugin.php?id=zqlj_sign', headers=headers, allow_redirects = False).text,'html.parser')
    hash = html.find('div',id='scbar').findAll('input',attrs={'name': "formhash"})[0]['value']
    a = sess.get('https://jietiandi.net/plugin.php?id=zqlj_sign&sign=' + hash, headers=headers)
    b = BeautifulSoup(a.text,'html.parser')          
    c = b.find('div',id='messagetext').find('p').text
    print(c)

if __name__ == '__main__':
    main()
cattie 发表于 2024-5-8 23:25
你要用这个脚本签到哪个论坛?
脚本简单而言就是发起了一个带cookie的get请求,适用于一些论坛的签到插件。
52的签到是基于任务系统的,有waf防护,你挂在云服务器上的签到请求会被拦截,所以用不了。
Scan 发表于 2024-5-8 23:35
他这个课还有吗新版Server酱+RN手机端开发实战
 楼主| 939709 发表于 2024-5-9 09:34
cattie 发表于 2024-5-8 23:25
你要用这个脚本签到哪个论坛?
脚本简单而言就是发起了一个带cookie的get请求,适用于一些论坛的签到插件 ...

里面有地址。能帮忙弄一下不
 楼主| 939709 发表于 2024-5-10 08:49
cattie 发表于 2024-5-8 19:58
[md]
```python
# -*- coding: utf8 -*-

云函数可以用,但是不知道为什么,无法定时签到。还是感谢大佬。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-30 19:16

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表