Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
fix: pending process by worker
Browse files Browse the repository at this point in the history
  • Loading branch information
beetcb committed Dec 19, 2020
1 parent bf4ecb5 commit c657b7c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crawler/captcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ const { createWorker } = require('tesseract.js')
const fs = require('fs')
const fetch = require('node-fetch')

console.log(process.pwd)
const worker = createWorker()
module.exports = async function ocr(captchaUrl) {
const worker = createWorker()
const filename = 'preview.png'
const pic = await fetch(captchaUrl)
await pic.body.pipe(fs.createWriteStream(filename)).on('finish', () => {
Expand Down

0 comments on commit c657b7c

Please sign in to comment.