Linuxで動作確認済みです。
まずvirtualenvでpipで必要なライブラリをインストールします。fugashiを使用していますがこの場合mecab-python3でも変わりません。
# MeCab関係
pip install fugashi unidic-lite
# EXEを作成するやつ
pip install pyinstaller
By default on Windows, conda saves new virtual environments to your C:/Users/<your username>/AppData/Local/conda/conda
. (AppData is hidden by default, but you can see it in File Explorer by checking View > Hidden Items.)
conda environments can get pretty big, so if you're running low on hard disk space and have another drive mounted, you can easily move your environment to a directory on the other drive and create a symbolic link to the new location. This way, conda will look in its regular path for the environment and will find it just fine, despite the actual files having been moved elsewhere.
Let's say we want to move the environments to a separate drive, mounted as D:\
. We'll put everything in D:\<your username>
.
Open up Command Prompt, and then enter:
# First, move all the contents of your environments directory over to the new location:
import requests | |
import json | |
import random | |
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid=' | |
headers = { | |
'Cookie': "Replace Me With REAL COOKIE" , | |
'Pragma': 'no-cache', |
// ==UserScript== | |
// @name YouTube字幕自动选择翻译->中文简体 | |
// @namespace http://tampermonkey.net/ | |
// @version 1.2 | |
// @description translate to Chinese automatically. 自动点击字幕翻译到中文简体 | |
// @author qwertyuiop6 | |
// @match https://www.youtube.com/* | |
// @grant none | |
// ==/UserScript== |