Current location - Recipe Complete Network - Complete cookbook of home-style dishes - [Crawler] How to export WeChat reading notes to the local area?
[Crawler] How to export WeChat reading notes to the local area?
I have read some books on WeChat reading APP, but many books have only been read once, and I forget them after reading them. For a professional book, reading it once is equivalent to not reading it, so it is necessary to export your notes to see how to enhance your memory.

Unfortunately, WeChat Reading APP only provides copying notes to the clipboard and pasting them to other places, while the PC version doesn't even have the function of cutting, let alone exporting. Even worse, the number of notes supported by this APP is limited. If you have more notes, you will choose to export them several times. Be sure to find the location you chose last time. As one of the core products of the largest Internet company in China, this simple demand can't be met, so I can only refrain from swearing.

So, I found a crawler tool developed by others on the Internet, led out the contents of my WeChat reading notes and simply recorded them.

1. Crawler tool preparation

Source code on Github: /arry-lee/wereader, written by Python3, locally cloned.

There are simple instructions for use:

Buy cookies

This step is the key. How to get it, please see this answer:/article/5d368d1ea6c6e33f60c057ef.html.

. I got the cookie in the first way.

Export notes

Use any IDE, I use Pycharm, create a new project, open the script, and first set the cookie I just copied in settings.py, as follows:

After the setting is completed, you can modify the script, export the notes and save them according to your own needs by running the client.py program. The format of notes export can be markdown.

However, I found that the content exported by this tool is not comprehensive, and some of them I clearly took notes but didn't export. Moreover, the order of the chapters it exports is reversed, which is not friendly at all. Of course, it can be modified on the basis of the author's script, and we will see it later.