Git Product home page Git Product logo

youdaonote-pull's Issues

网页转存文件导出后显示为未知文件

首先导出顺利,感谢脚本。
但是发现仍有一种类型的笔记导出结果为不带扩展名的文件,比如下方这则来自微信公众号的笔记:
http://note.youdao.com/noteshare?id=1041bc6f2596ca150b57edccc971d142&sub=96F960F7AF674D24BE8C6523E3051851
其实就是一则平白的图文公众号,导出后变成一个所附近压缩文件中的那个未知文件。
类似的笔记我还有很多。
不知道是否有一个原因在背后,感谢 !

CmK, Cp 和CpK的计算方法.zip

缺少标题和内部样式转换

  1. 可以加上heading 标题级别,里面的level 代表标题级别,a是大标题,1-6是标题机
        <heading compat="true" level="2">
            <coId>7740-1543502828194</coId>
            <text>1.2 元注解</text>
            <inline-styles>
                <bold>
                    <from>0</from>
                    <to>7</to>
                    <value>true</value>
                </bold>
                <font-size>
                    <from>0</from>
                    <to>7</to>
                    <value>20</value>
                </font-size>
            </inline-styles>
            <styles/>
        </heading>
  1. 可以加上行内元素, inline-styles标签里面有加粗、颜色还有下划线倾斜啥的,感觉都可以加上去。
        <para>
            <coId>5866-1543505640634</coId>
            <text>定义注解成员的注意点</text>
            <inline-styles>
                <bold>
                    <from>0</from>
                    <to>10</to>
                    <value>true</value>
                </bold>
                <color>
                    <from>0</from>
                    <to>4</to>
                    <value>#df402a</value>
                </color>
				 <color>
                    <from>5</from>
                    <to>10</to>
                    <value>#df412a</value>
                </color>
            </inline-styles>
            <styles/>
        </para>
  1. catalogue标签 感觉多个catalogue 只取第一个用 [toc] 目录替代,其余的扔掉即可
    十分感觉,找了好久,可以贴一下赞助码啥的。

运行pull无响应,运行test提示


运行错误退出测试


验证 config.json 格式错误(花括号位置),是否结束执行并输出提示

错误提示:请检查「config.json」格式是否为 utf-8 的 json!建议使用 Sublime 编辑「config.json」
已终止执行
.----------------
验证 config.json 格式错误(有注释),是否结束执行并输出提示

错误提示:请检查「config.json」格式是否为 utf-8 的 json!建议使用 Sublime 编辑「config.json」
已终止执行
.----------------
测试 config 的 key 被修改时

错误提示:'请检查「config.json」的 key 是否分别为 username, password, local_dir, ydnote_dir, smms_secret_token'
已终止执行
.----------------
验证账号密码为空时,是否结束执行并输出提示

错误提示:账号密码不能为空,请检查「config.json」!
已终止执行
.----------------
当 ydnote_dir 不存在时,是否结束并提示

E----------------
当 local_dir 错误时(为相对路径),是否结束并提示

E----------------
当 local_dir 错误时(不存在上层文件夹),是否结束并提示

E----------------
有道云笔记修改接口,是否提示

E

ERROR: test_config_ydnote_dir_err (main.TestErrorExit)

Traceback (most recent call last):
File "test.py", line 235, in test_config_ydnote_dir_err
set_right_cookies()
File "test.py", line 32, in set_right_cookies
with open('cookies-right.json', 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'cookies-right.json'

======================================================================
ERROR: test_config_local_dir_err (main.TestErrorExit)

Traceback (most recent call last):
File "test.py", line 255, in test_config_local_dir_err
set_right_cookies()
File "test.py", line 32, in set_right_cookies
with open('cookies-right.json', 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'cookies-right.json'

======================================================================
ERROR: test_config_local_dir_err2 (main.TestErrorExit)

Traceback (most recent call last):
File "test.py", line 275, in test_config_local_dir_err2
set_right_cookies()
File "test.py", line 32, in set_right_cookies
with open('cookies-right.json', 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'cookies-right.json'

======================================================================
ERROR: test_get_all_youdao_url_change (main.TestErrorExit)

Traceback (most recent call last):
File "test.py", line 287, in test_get_all_youdao_url_change
with open('config-right.json', 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'config-right.json'


Ran 8 tests in 0.007s

FAILED (errors=4)

运行下载测试


验证 smms_secret_token 为 null 时,是否能完整下载成功

E----------------
验证 smms_secret_token 不为 null 时,是否能完整下载

image

image

导出时的几个问题

感谢开发者,整体上很好用。
两个小问题。

  1. 有的笔记没有文件后缀,但是是xml格式的
  2. 有的文件是note后缀,但是其实里面是纯html

关于字体

希望可以保留有道云笔记中字体的颜色、加粗等效果

感谢分享

可以增加一个修改修改图片 地址为自定义的图床

markdown 格式无法保留原来笔记的颜色和格式

您好,

感谢您的程序,我成功的下载了有道所有的笔记。不过因为我原来的笔记有很多不同的颜色和格式,下载后这些格式在markdown里面无法显示出来。请问有没有可能把所有笔记下载成其他格式呢?

谢谢

图片下载建议

建议图片下载到markdown文件同目录,或者只md文件的目录下,建一个和md文件同名的目录放这个md文件的图片,这样比较方便分享单个或者一个目录给别人,谢谢!

not enough arguments for format string

如题,导出某些文件时抛错:

not enough arguments for format string
已终止执行

似乎是转换有道云图床的图片到本地的时候抛的。

中文乱码问题

自定义要导出的文件目录,程序读取信息需要设置成“utf-8”,否则会出现中文乱码匹配不上文件夹名
with open('config.json', 'r',encoding="utf-8")
其他读写文件的地方,建议都改成utf-8

当前版本要求所有参数都填写,没有选填参数

代码中的45行

    if not username or not password or not local_dir or not ydnote_dir or not smms_secret_token:
        raise KeyError('请检查「config.json」的 key 是否分别为 username, password, local_dir, ydnote_dir, smms_secret_token')

如何才能让图片放到md里面呢?

现在的导出是将图片统一放到youdao-images这个文件夹里,然后md里面引用本地链接。不过这样就导致文件过大时,迁移笔记很容易失败。
请问有没有办法能够让图片直接下载到md和文字在一起。这样我就可以分批导入文件,既不用担心没文字,也不用担心文件过大迁移失败了。

【求助】请检查账号密码是否正确!……

非常有用的工具!

作者您好,我按说明运行,总是如下报错提示。用的Mac系统,config文件是按说明里的例子填的。我换用自己的账号也是一样的错误。通过VPN更换了ip也不行。请问有可能是什么原因吗?

{
"username": "[email protected]",
"password": "12345678",
"local_dir": "",
"ydnote_dir": "",
"smms_secret_token": ""
}
错误提示:请检查账号密码是否正确!也可能因操作频繁导致需要验证码,请切换网络(改变 ip)或等待一段时间后重试!
已终止执行

能否导将Note转成HTML格式

能否导将Note转成HTML格式,方便二次处理,比如静态web或者是导入到Evernote
有道越来越恶心,关掉了导出通用格式的接口,说白了就是怕用户跑了,客观现实就是我笔记太多了,还真的不好跑

保存到本地的笔记中的图片路径错误

保存到本地的笔记初根目录的外,其余所有目录下的笔记中的图片路径都缺少了一个层级,导致图片无法显示。
如:markdown中写的是

![](./youdaonote-images/XXXXXXXXX.png)

而实际的路径应该是../youdaonote-images/XXXXXXXXX.png

有道云微信用户导出(亲测可行)

  • 微信账号称为账号A。
  • 然后你得先注册一个有道云笔记账号,要使用邮箱注册(因为这样才有账号和密码),下面称为账号B。
  • 然后使用账号B登录有道云笔记web端,然后点击账号设置->账号信息->导入->导入微信笔记
    输入图片说明
  • 一定要点击选择导入微信账户数据,之后使用账号A的微信扫码验证就可以了。
  • 然后等会数据同步到账号B了,在使用脚本拉取账号B就行了。
    输入图片说明

Typora + Dropbox + MWeb 使用教程

请仓主有空写下Typora + Dropbox + MWeb的使用教程。
我试着先导出有道云笔记到本地电脑上,再同步到dropbox,iPhone端使用mweb查看dropbox文件不成功。原因是同步的文件需要是由MWeb客户端记录的笔记才可(即需要docs和mainlib.db文件才行),如何才能直接用Typora写,然后手机端查看?

大佬 看一下

我分别在git环境和python环境下输入了pullAll那句话,都报错了呢,帮忙看一下吧

微信图片_20200604190041
微信图片_20200604190046

只有图片的笔记,导出后正文无图片的引用

在只有图片的笔记,导出后正文无图片的引用。看原始的xml文件,是其中无标签,xml内容如下:

        <image>
            <coId>79cona1426892476168</coId>
            <source>https://note.youdao.com/yws/res/6666/9178c110120a22cb4ef6e66ace6729e1</source>
            <styles/>
        </image>

导致以下的代码没有起作用:

                    elif 'text' in child2.tag:
                        # 部分图片无text标签,但有<styles/>
                        image_name = child2.text
                        if child2.text is None:
                            image_name = ''
                        new_content += f'![%s](%s){nl}{nl}' % (image_name, image_url)
                        break

建议将这部分修改如下

                    elif 'text' in child2.tag:
                        # 部分图片无text标签,但有<styles/>
                        image_name = child2.text
                        if child2.text is None:
                            image_name = ''
                        new_content += f'![%s](%s){nl}{nl}' % (image_name, image_url)
                        break

                    elif 'styles' in child2.tag:
                        # 解决无text标签,但有<styles/>
                        image_name = ''
                        new_content += f'![%s](%s){nl}{nl}' % (image_name, image_url)
                        break

not enough arguments for format string

脚本执行一半遇到这个问题:
RuntimeError Expected object of device type cuda but got device ty.md ,「云笔记原格式为 .note」
not enough arguments for format string

运行错误

请问,Win10,运行之后出这个是什么原因呢?谢谢
$ python pull.py
▒▒▒▒ config.json ▒▒ʽ▒Ƿ▒▒▒ȷ▒▒
▒▒▒˳▒

child index out of range

「/Users/xxxx.note」转换为 Markdown 失败!请检查文件!
错误提示:child index out of range

转换md报错

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.