Giter Site home page Giter Site logo

Comments (3)

mastrolube avatar mastrolube commented on June 12, 2024
%pip install pytesseract
import uiautomator2 as u2
import pytesseract as pt
pt.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'

d = u2.connect()
screenshot = d.screenshot()
obj = d(resourceId="com.instagram.android:id/row_feed_photo_profile_name")
bounds = obj.info["bounds"]
screenshot_cropped = screenshot.crop([bounds.get("left"), bounds.get("top"), bounds.get("right"), bounds.get("bottom")])
screenshot_cropped.show()
text = pt.image_to_string(screenshot_cropped)  
print(text)

from bot.

sagirab avatar sagirab commented on June 12, 2024

Hey there,
I get this error and I think this is related to this topic.

[03/18 18:31:47] INFO | Scroll down to see next post.
[03/18 18:31:50] INFO | Can't find the owner name, need to use OCR.
[03/18 18:31:51] ERROR | You need to install Tesseract (the engine: it depends on your system) in order to use OCR feature.
[03/18 18:31:51] ERROR | Traceback (most recent call last):

I tried to install tesseract but seems like I failed. How can I resolve this issue ?

from bot.

mastrolube avatar mastrolube commented on June 12, 2024

the bot shouldn't crash with 3.2.12. update

from bot.

Related Issues (20)

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.