一个Linux.do自动点赞、阅读帖子的脚本
仅限技术研究,请勿刷赞刷阅读 核心代码参考了 https://114114.xyz/article/discourse_org_read_and_liked 使用协程,但是并未使用并发请求,仍是同步执行,方便后期添加异步任务。 配置文件conf.json { "csrf-token": "", "cookies": { "_forum_session": "", "cf_clearance": "", "_t": "" }, "connect-cookies": { "auth.session-token": "", "cf_clearance": "" } } 代码 #!/usr/bin/env python import httpx import asyncio import json import copy from pathlib import Path from pyquery import PyQuery HEADERS = { "Accept": "application/json, text/javascript, */*; q=0.01", "Host": None, "Discourse-Logged-In": "true", "Discourse-Present": "true", "Discourse-Track-View": "true", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) " "AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17....
Hugo、twikoo、umami博客搭建
Hugo Hugo官网 # 安装 brew install hugo # 创建项目 hugo new site blog --format=yaml 创建git仓库 cd blog git init PaperMod主题 git submodule add https://github.com/adityatelange/hugo-PaperMod/ themes/PaperMod 修改配置文件hugo.yaml theme: PaperMod 启动测试 hugo server PaperMod主题 Github仓库 这个主题有许多可配置的选项,具体参考hugo.yaml配置文件或者主题Wiki baseURL: "https://example.com" title: PaperMod deFaultContentLanguage: zh languageCode: zh paginate: 5 theme: PaperMod enableRobotsTXT: true buildDrafts: false buildFuture: false buildExpired: false enableEmoji: true minify: disableXML: true minifyOutput: true taxonomies: category: categories tag: tags params: env: production # to enable google analytics, opengraph, twitter-cards and schema....