Skip to main content

scrapy的异步翻译,最准确的翻译器

Project description

AroayTranslate

主要用于scrapy 异步翻译,需要使用代理

使用

pip install --upgrade aroay-translate

配置

DOWNLOADER_MIDDLEWARES = {
    'aroay_translate.downloadermiddlewares.TranslateMiddleware': 543,
}
AROAY_TRANSLATE_HEADLESS = True

使用

class TranlateSpider(scrapy.Spider):
    name = 'tranlate'
    allowed_domains = ['deepl.com']
    start_urls = ['http://deepl.com/']

    def start_requests(self):
        """
        script :需要翻译
        langs: 翻译语言选择
        :return:
        """
        for i in range(1, 2):
            yield TranslateRequest(
                script="愛くるしい雰囲気たっぷりの女優4人が男たちを勃起させ惑わせます!悩ましいお顔でカメラ目線の垂直式イラマチオをする美波ゆさちゃんは途中ゲホっとしつつも喉奥まで咥えてしっかりザーメン受けとめます。ムチムチボディの藤沢えみりちゃんと、スレンダー美女の橘小春ちゃんのロリ2人は馬乗りフェラとパイズリ、ラストの豊田ゆうちゃんの淫語連発カメラ目線主観オナニーは文句なしで卑猥すぎ!4人の心のこもったご奉仕をご堪能ください~",
                langs=('ja', 'zh'))

    def parse(self, response):
        print(response.text)

支持的语言

               <from:lang>: {auto it et nl el sv es sk sl cs da
                             de hu fi fr bg pl pt lv lt ro ru en zh ja}
               <to:lang>:   {it et nl el sv es sk sl cs da
                             de hu fi fr bg pl pt lv lt ro ru en zh ja}

Project details


Release history Release notifications | RSS feed

This version

1.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aroay_translate-1.3.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

aroay_translate-1.3-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file aroay_translate-1.3.tar.gz.

File metadata

  • Download URL: aroay_translate-1.3.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for aroay_translate-1.3.tar.gz
Algorithm Hash digest
SHA256 2041b3d6c6129c4087d37748e95be5bcc585ff61b44f59793f5a90f2d0e5ee79
MD5 fe1c462d73b85e1d4c15f94c148a595e
BLAKE2b-256 b67668b5e7a2f0021a4c621797c7ea82f3970ce9b59af69e39c8aa59148dcbb0

See more details on using hashes here.

File details

Details for the file aroay_translate-1.3-py3-none-any.whl.

File metadata

  • Download URL: aroay_translate-1.3-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for aroay_translate-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 790d24de1d6b7502c00eff0b4303c94a33f02ec08d7c64b672563274572eb699
MD5 cfeb19ef94040d4d2d1b647779159842
BLAKE2b-256 3b79711528a40d8cc5568ce4c0bfe4a781e2d54244715a3a8cc788d7d0da3336

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page