20230128
这周发生了啥?
优化工作流
Logseq 推出 Copy as Plain text 后,加上自己改变了码字习惯,已经被简化
- 这周六连续发了两篇博客 1119-existence-is-suffering 1130-killing-external-links-sucks, 然后花了非常多的时间重读, 删改, 还是和想象中的差好多, 为什么我写出来的东西这么垃圾? 我总是怀疑自己
- 总体来说, 做的重复的工作是
文本导出, 然后替换大纲格式
为文章格式
;把 Logseq 的特性去除, 如[[]]
,property
;- 把多媒体文件压缩;
- 然后托管给 Github;
- 拿到重命名后缀后备份图片到 NPM;
- 也许 Logseq 里面重命名就可以;
- 等到 Github 失效的时候, 再启动 NPM, 这样也好替换链接;
- [麻烦] 校读, 然后删改
- 这一步应该提前
background-color: red
- 两头都可以修改导致容易发生冲突
- 这一步应该提前
background-color: red
**[麻烦 MAX] ** Searching image for blog (配图)用 stable diffusion 随机生成。- Sometimes I remember the photo but I don’t know where I put them to. Even though I used the manage software for images, like billfish, but it’s still kind of mess, just a little better then before(using tag folder manage);
- Because that software just for collect images in the browser, you do this great. But you actually are lazy in management, right?
- Sometimes I remember the photo but I don’t know where I put them to. Even though I used the manage software for images, like billfish, but it’s still kind of mess, just a little better then before(using tag folder manage);
- Solution
- Stop using info flow (twitter), using info-fetching, like rss.
- Using
Instagram
ortwitter
RSS in rsshub directly seems like impossible.- Either the route is invalid, or the site have blocked request.
- I write a script for twitter, it’s almost done;
- But I should get tweet info full using my code, not other API!
- But Instagrm is kind of complex.
- Also they don’t support RSS and must keep login. And a useful tool is Instagram editor and viewer - Picuki.com;
- I notice the Instagram have ID, username and nickname, it’s really complex…
- I found they using cache in first profile and load the full address in image viewer.
- Get the full size of picture is also wired, such as post link is
https://www.instagram.com/p/CnmCfYVP0bU/
, and request full size address ishttps://www.instagram.com/api/v1/media/3019111552721569492/info/
, I don’t understand - Even though I get the image address and would download it. The browser jump to url instead downloading.
- Get the full size of picture is also wired, such as post link is
- Using
- Stop using info flow (twitter), using info-fetching, like rss.
// 1
fetch('https://www.instagram.com/p/B4SEmaKHAHf/media/?size=l')
.then( res => res.blob() )
.then( blob => {
console.log(blob);
});
var downloadAddress = "https://instagram.fsin3-1.fna.fbcdn.net/v/t51.2885-15/73521777_1119177715140336_5673804226715474917_n.jpg?stp=dst-jpg_e15\u0026_nc_ht=instagram.fsin3-1.fna.fbcdn.net\u0026_nc_cat=100\u0026_nc_ohc=0RjZiGKKcFkAX9sxZDo\u0026edm=ALQROFkBAAAA\u0026ccb=7-5\u0026ig_cache_key=MjE2ODkxODE5MTQzMDg4OTA1NA%3D%3D.2-ccb7-5\u0026oh=00_AfD68UPNYCQQvM7EaNeEVM5BcoR-NgNZJ1f-W8s7Noq74A\u0026oe=63D327C6\u0026_nc_sid=30a2ef";
var downloadVariable = document.createElement('a')
downloadVariable.href = downloadAddress;
downloadVariable.setAttribute('download','')
downloadVariable.click();
- A useful advise is adding
/media?size=l
in the post url. It’s faster than inspect. But I want to use in code… via: how to get a image or video url from IG post? - Stack Overflow - An awesome library is instaloader/instaloader: Download pictures (or videos) along with their captions and other metadata from Instagram. github opensource
- They support update using last status!!! They have status!!!
- I would stop using twitter getting photo. Most they have a Instagram account. I would using this tool and try todo
防盗链无解 😭 Cannot Bypass Hotlink
$.ajax({
type : "GET",
url : "https://img.reimu.net/uploads/2023/01/63bb0e411c677.png",
beforeSend: function(xhr){xhr.setRequestHeader('referer', 'https://img.reimu.net');},
success : function(result) {
//set your variable to the result
console.log(result);
console.log("sucessful");
},
error : function(result) {
//handle the error
console.log("failed");
}
});
// jquery-3.2.1.min.js:4 Refused to set unsafe header "referer"
fetch('https://img.reimu.net/uploads/2023/01/63bb0e411c677.png', {
method: 'GET',
headers: {
'Referer': 'https://img.reimu.net'
},
})
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
// Still cannot set refer request 😅
The specification requires that the browser abort the
setRequestHeader
method if you try to set theReferer
header (it used to be thatUser-Agent
was also forbidden but that has changed).. via: javascript - Ajax request: Refused to set unsafe header - Stack Overflow
You can’t, document.referrer is a read-only property, which value changes only when picking a link. If this picked link is on a security site, an empty string is assigned. via: How to manually set REFERER header in Javascript? - Stack Overflow
- Cloudflare 防止网站文件被盗链的设置教程 – 静下来
- Referer spoofing - Wikipedia
- How to spoof http referer - Stack Overflow
- How to send a header using a HTTP request through a cURL call? - Stack Overflow
- RSSHub/rank.js at master · DIYgod/RSSHub · GitHub
const referer = `https://m.douban.com/book/${type}`;
const _ = async (type) => {
const response = await got({
url: `https://m.douban.com/rexxar/api/v2/subject_collection/book_${type}/items?start=0&count=10`,
headers: { Referer: referer },
});
return response.data.subject_collection_items;
};
Douban api
https://m.douban.com/rexxar/api/v2/subject_collection/book_nonfiction_hot_weekly?updated_at=&for_mobile=1
referer
required:https://m.douban.com
人类一思考,上帝就发笑
说实话, 我发现自己更喜欢前端一点
但是我觉得后端可以做更多的事情, 所以我最终选择了后端, 可替代性强一些.
喜欢前端的原因是当前这个世界有太多的 API (Private or Public), 不考虑商业侵权等因素, 可以在极短的时间, 通过缝合, 创造出无数的产品, 来应对各个场景下的需求, 节省我们的时间, 提高我们的效率, 这听起来非常迷人
后端往往时从 0 到 0.5, 前端则是从 0.5 到 1
我的恋人, 那些原生家庭 (Native Family) 过不去的坎, 总还是和同龄人比较得来的
拿最简单的传统来说, 孩子 12 岁总归要办一次宴席的, 这我不 Care, Really! 就算损失掉藉此和女神搭话的机会也无所谓, 但父母口中随意欠下的那顿烧烤, 虽然未来的日子我也吃了不多, 但那次的失言让我彻底失了望, 所以自此我一直怀疑他们对我的承诺;
其次, 就是想要之物的许可. 一直以来, 家长觉得什么好就塞给我, 补习班, 习题课, 不同款式的衣服… 他们很少问我喜欢什么, 反正只要我不要喜欢学习之外的东西就行了, 这就是他们对我的期待. 那年我站在表哥房间外, 听着他和小伙伴拆开半屋子礼物的声音, 羡慕的要死, 不敢进去, 也不敢久留, 匆匆跑掉了, 那是一种过早接触 NTR 的感觉, 那些魔法般的道具不属于我
这口气一直憋着, 等终于有勇气和父母提的时候, 得到的几乎就是一顿臭骂, 当时我总要归因给自己, 一定是自己不好, 又惹父母生气了, 次数多了渴望也就被埋没掉了, 但它始终在原地
现在想想, 没钱又不是我的错, 指着我骂有用? 好受了点吗? 操他妈的.
混沌的新年, 重新整理了自己的素材库, 重新整理了自己的书单
我不知道怎么形容我的这一周, Totally Mess, 从周一到现在一直缺少一个主旋律, 像是一个目标的东西, 周日刚开始那几天, 心里想着逢年过节得给自己放一个假, 松松螺丝, 后来书也不看了, 项目也不做了
有了点闲钱之后就想着给自己买点什么东西, 整日开始逛游戏商城, 买的游戏永远不是自己想玩的, 而是自己买的起的, ” 好像, 这个游戏还可以… 要不买回来试试?” 但其实只要三分钟热度一过, 这钱就相当于白花了, 你再也不会打开游戏;
起头那两天发了两篇文章之后就想着优化自己的写作流, 因为之前的流程还是非常生疏, 每个环节拖的时间也非常长, 我发现 All in One 是多么愚蠢的方案, 之后改用 One Directory for One Artist 的方案, 效果还不错, 但是我还没有想清楚我可以未这样的数据库付出多少精力去维护 ? 并且, 如果用自动化脚本去执行, 这很重要!
优化素材库的时候, 发现用 Billfish 差不多也有一年多了, 单单从 Twitter 上用手拖下来的图片差不多就上千张了, 其实这是一个非常累人的工作, 我之后不会再做了, 我之前以为的便捷, 如今已经变成了成千上万个待办事项来等我去整理, 这种内耗的工作, 雅蔑蝶了… 是在是太糟糕了;
我也不清楚数据库丢失是这么容易发生的事情, 某天晚上看电脑看得太晚就直接 Hibernate
了, 起来之后, 也没检查一下 billfish
, 没注意到什么时候我的一个素材来源的文件夹快捷方式消失了 (可能是某次不小心删除了), 导致我的素材库直接开始了半分钟的删库操作, 我的图片 +URL 的乌托邦彻底粉碎了, 但我胸有成竹, 因为我可以靠 Onedrive 回档, 我把 Billfish 的 Backup 文件夹链接到了 Onedrive, 可放我进入文件夹准备回档的时候, 我发现因为我中途重新整理过 Onedrive 文件, 导致这个备份在两个月前就失效了, 时至今日, 为时已晚, 低头嗟叹, 去他妈的;
全都拖进了回收站
悲观
就是听了,刚刚内眼角就是我自己的想法还是想让自己变得独立思考了,因为听了聊一的那直播课之后我发现哦,我只是不严格,意义上不算,是一个会独立思考人,因为我是实惠考虑别人的意见,有时候父母的意见是同学的意见啊,长辈的意见网友的一家人的种种种种我,其实很少去问我自己的一些就是。我很想去几次来找到,我自己就是找到自己喜欢的东西,可是我觉得是需要一个环境去折腾,这是我知道就算我跑到外面,我还是会考虑我父母的家庭的各种各样的元素,但我不知道我就感觉是如果我一辈子呆在处理好,我永远都不会出去的这座城市,我觉得我看不到太多的专辑。
你根本没有时间花在爱好上
The cruel reality is that, we don’t have much time spending in hobby, a game takes me 2 hours before daybreak. But I spend the whole morning searching the meaning of game story plot. I record and publish and wait someone could reply me and so on. Its really kind of #Kill Time, good. But I cannot image how much time I would ready for it. Especially when I have so much interest in different fields. fuck-reality
沙发土豆的自我修养
- todo 游戏单
- 旺达与巨像 ワンダと巨像 | Bangumi 番组计划 (bgm.tv) 独占
- 也许有一天可以在 PS2 / PS4 上模拟这个游戏;
- 赏金奇兵 3 Desperados III | Bangumi 番组计划 (bgm.tv)
- 杀手 2 Hitman 2 | Bangumi 番组计划 (bgm.tv)
- Nyan Cat: lost in space Nyan Cat: Lost in Space | Bangumi 番组计划 (bgm.tv)
- 凯瑟琳 キャサリン | Bangumi 番组计划 (bgm.tv)
- 地铁: 离去 Metro Exodus | Bangumi 番组计划 (bgm.tv)
- 逃出生天
- 最终幻想 10 重制; 15
- 风之旅人 Journey | Bangumi 番组计划 (bgm.tv)
- 怪物圣所
- 旺达与巨像 ワンダと巨像 | Bangumi 番组计划 (bgm.tv) 独占