User:快乐的老鼠宝宝/沙盒

关于某个白毛吸血鬼故事的设定 编辑

请查阅十大城堡,然后分别查看其谷歌地球上的地理位置和街景

例如选中的两个

很遗憾的是剧本不干了,我也不干了


'''若瑟兰城堡'''是坐落在乌斯河附近的一座小城堡。

城堡附近的城市有Boroughbridge

家庭装修大百科 编辑

看到的时候请记得随便写点啥或者研究一下下面的模板为什么出问题




[[File:Wikipedia_app_icon.jpg|frameless|25px]]

[[[File:Wikipedia_app_icon.jpg|frameless|25px]] https://{{{lang|}}}.wikipedia.org/wiki/{{{entry|}}}]

https://{{{lang|}}}.wikipedia.org/wiki/{{{entry|}}}

[https://{{{lang|}}}.wikipedia.org/wiki/{{{entry|}}}]

<a href="https://{{{lang|}}}.wikipedia.org/wiki/{{{entry|}}}">[[File:Wikipedia_app_icon.jpg|frameless|25px]]</a>

测试签名档 编辑

是可爱的鼠宝宝 | 我要留言,我现在就要留言

请输入如下代码替换

--~~~~

测试python编辑wikipedia(不论是mwclient还是pywikibot) 编辑


#2024-01-29 17:35:21.166250

import base64
import datetime
import json
import os

import mwclient

# CONST

SITE_NAME = "zhwiki"
print(json.load(open("wiki_config.json", "r", encoding="utf-8")))
SITE_LINK = json.load(open("wiki_config.json", "r", encoding="utf-8"))[
    "SITE_LINK"
][SITE_NAME]
SITE_PATH = json.load(open("wiki_config.json", "r", encoding="utf-8"))[
    "SITE_PATH"
][SITE_NAME]
USERNAME = json.load(open("wiki_config.json", "r", encoding="utf-8"))[
    "USERNAME"
][SITE_NAME]
PASSWORD = json.load(open("wiki_config.json", "r", encoding="utf-8"))[
    "PASSWORD"
][SITE_NAME]
SYMBOL_PRE_BEFORE = base64.b64decode(b"PHByZT4=").decode("utf-8")
SYMBOL_PRE_AFTER = base64.b64decode(b"PC9wcmU+").decode("utf-8")
SYMBOL_CODE_PART = base64.b64decode(
    b"PCEtLSBMQU9TSFVCQUJZIEJPVCAtLT4="
).decode("utf-8")

# init

site = mwclient.Site(
    SITE_LINK,
    path=SITE_PATH,
    clients_useragent="laoshubaby's robot",
)
site.clientlogin(username=USERNAME, password=PASSWORD)

page = site.pages["User:快乐的老鼠宝宝/沙盒"]
text = page.text()
comment = ""


def replace_this() -> str:
    with open(os.path.realpath(__file__), "r", encoding="utf-8") as f_this:
        this_code = f_this.read()
    this = (
        "<br/>"
        + ("#" + str(datetime.datetime.now()))
        + "<br/>"
        + SYMBOL_PRE_BEFORE
        + this_code
        + SYMBOL_PRE_AFTER
    )
    if SYMBOL_CODE_PART in text:
        text_part = text.split(SYMBOL_CODE_PART)
        return SYMBOL_CODE_PART.join([text_part[0], this, text_part[2]])
    else:
        return text + this


page.edit(replace_this(), comment)