Code Monkey home page Code Monkey logo

imouto.host-updater's Introduction

Hello I'm Sharuru!

💻 Have you tried turning it off and on again?

I am a backend engineer, currently based in Shanghai.

imouto.host-updater's People

Contributors

sharuru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

imouto.host-updater's Issues

拓展需求

  • 多平台使用
  • 多源监测
  • 多源复合生成HOSTS

重构local_checker

现在的local_checker只能return version, 把文件存在判断也加进去, 直接对预设的global对象操作.

基本需求

因为主要是给自己用的,所以需求从简就好:

  • 源状态监测
  • 自定义HOSTS配置

以下,是移动至Milestone: Improve Version的原基本需求

  •  多平台使用  
    
  •  多源监测  
    
  •  多源复合生成HOSTS  
    

使用其他的源

projecth都挂了太久了,需要增加从别的源获取hosts的方式

重构getter函数

现在是根据id把正则规则硬编码在程序里的, 因为源上的文件发布规则统一, 所以只要更改关键字部分, 正则规则就能通用.

多次更新后的编码问题

本地测试的时候进行过多次的无文件→新建,旧文件→新文件的测试,没有发生编码问题,在更新了V2.22.0519后,本地检测会有编码错误,需要检查一下。
附注:
r模式。
也许是新增的记录里有哪里有问题。(以后ignore掉?)
或许是我存取的方法不规范。
也许只是我的系统有问题。

连不上projecth.us QAQ

无论使用Requests还是urllib2都连不上projecth.us, 一定有阴谋 ⊂彡☆))д´)

试过其他的https都能简单的获取到内容QAQ

改过UA什么的也不可以QAQ

一次性write数据

现在实现方式是写入新hosts, 写入换行符, 写入自定义hosts. file object 建立3次, 虽然性能影响微乎其微, 但是为符合规范还是要建一个buff组合数据一次性写入.

编码问题怎么修QAQ

都说不要在Windows下用Python了…结果现在有编码问题…明明读写都是UTF8了…然后过一段时间去看编码就会变掉然后中文会全部乱码,然后就会报错啊有木有。
小渣渣随便写的辣鸡代码被菊苣们Star了感觉压力炒·鸡·大啊有木有!!!
哪位菊苣告诉我怎么把处理不了的字符干掉啊QAQ
不想用ignore因为有强迫症啊啊啊啊啊啊啊QAQ
真的快哭死了啊QAQ
再这样下去我要写C#了QAQ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.