Warning
⚠️ NSFW 警告:本篇文章可能包含暴力,性描写等仅供 18 岁以上阅览的内容。
Why
我很喜欢色情内容,但如果把它和其他订阅源放在一起,我一定不会再花时间琢磨别人的博客了,加上本人自制力差,容易被性暗示唤起性欲,所以对我来说,色情内容需要做隔离。
那为什么不用 RSSHub,还要自己用 Python 写规则呢?
- 定制化:我需要对拉去下来的源做附加的逻辑,比如过滤器,预览图替换,防盗链 (todo)
- 版权:RSShub 已经算是一个知名的项目了,且对一些版权性 PR 持保守态度,树大招风,我觉得你一定懂。
- 周期:开发周期会被 RSShub 上游卡着,或者我本地需要部署一个 RSShub 实例,比较麻烦,加上本身菜,就当练手了。
当然,这个项目不可能盈利,仅仅是继 个人博客 后,出于兴趣探索的再一款 jekyll 博客。
有非常多局限,如内容排版,目录导航,视觉设计等等,还有非常多待改进的地方
How
Vercel host via https://hentai.bgzo.cc
Source via: https://github.com/bGZo/hentai
What
Features
- Fetch RSS feeds and keep the latest resource daily
- Persist feeds in repo and support API with following (
http://rss.bgzo.cc
) with json
Name | Route | Description | Method | Note |
---|---|---|---|---|
Feed | /feeds/${tag_name_with_hyphen_and_lower} | RSS feed, return xml | GET | ${tag_name_with_slash_and_lower} is the url string handle by lower() and hyphen(- ). For example, we have a DLsite Game Ranking.xml file in server, then the correct full url address will be http://rss.bgzo.cc/feeds/alsite-game-ranking.xml ; |
Contents | /archives/${year}/${month}/${day}.json | Contents, return JSON response | GET | NOTE: The timezone of response is GMT, format it whatever you want |
Todos
- doing Support more sources
- https://www.dlsite.com
- https://www.4gamers.com.tw
- https://mingqiceping.com (Feed 地址失效)
- Telegram
- todo More usable
- Separate from RSS sources configuration from codes
Wontfix
防盗链
一些网站本身开启了防盗链,如: 灵梦御所。除非单独构建应用,或是添加请求头 Referer: https://blog.reimu.net
,否则在一般的浏览器,是无法绕过的。
比如以下图片,你无法把它嵌入到你的博客,却能正常通过鼠标右键新建标签页打开浏览。
https://img.reimu.net/uploads/2023/06/6499957d1a902.png
How to deal with the content only show for the user login?
So the way RSS is bankruptcy, how does you request content using common method? How do you recognize the different websites? There are too much details.
How to deal with the copyright?
Considered the risk of copyright, I should not build any mirror site for business content.
Alternatives
- https://nodetics.com/feedbro
- Telegram pron channel
Tech Stack tech-debt
- jekyll
- python
- date
- Python datetime (With Examples) (programiz.com)
- How to Create a Time Object in Python (learningaboutelectronics.com)
- Python Create Date Object (w3schools.com)
- datetime — Basic date and time types — Python 3.11.4 documentation
- Get Previous, Current and Next-Day System Dates in Python – Data to Fish
- Python timestamp to datetime and vice-versa (With Examples) (programiz.com)
- dict
- pyyaml
- feedparser
- requests
- feedgen
- pytz
- others
- python - How to raise an AttributeError? - Stack Overflow
- 为什么产生 pycache - Google Search
- python函数如何传递多个参数_python传入多个参数_LLY_A_的博客-CSDN博客
- Python传入参数的几种方法-腾讯云开发者社区-腾讯云 (tencent.com)
- import - Python FileNotFoundError : - Stack Overflow
- python - How do I create a directory, and any missing parent directories? - Stack Overflow
- File Handling in Python – How to Create, Read, and Write to a File (freecodecamp.org)
- python - Write a file to a directory that doesn’t exist - Stack Overflow
- python - Converting dictionary to JSON - Stack Overflow
- python - How to make a datetime object aware (not naive) - Stack Overflow
- python - Is there a list of Pytz Timezones? - Stack Overflow
- date
- tailwindcss
- html css
- javascript
- Git
- Others
- Can’t open the tabnine setting panel
-
FWIW I was able to install 3.2.8 without issue. — Tabnine Extension was unable to download its dependencies. · Issue #447 · codota/tabnine-vscode --- Tabnine Extension 无法下载其依赖项。 · 问题 #447 · codota/tabnine-vscode
-
降级到 3.2.8 wsl
-
command ‘TabNine.statusBar’ not found · Issue #426 · codota/tabnine-vscode (github.com)
-
hub not loading · Issue #643 · codota/tabnine-vscode (github.com)
-
WSL2 Issue with TabNine:config · Issue #386 · codota/TabNine (github.com)
-
visual studio code - Tabnine Extension was unable to download its dependencies - Stack Overflow
-
- Can’t open the tabnine setting panel
PY 开始提醒强制使用 VENV
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Solution
Pycharm 开启虚拟环境:
Settings > Project: > Python Interpreter > Add Interpreter > Select Virtualenv
, via: https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html#python_create_virtual_env