Handle according to response type from URL while downloading a file from chrome
Opened this issue · 5 comments
Improve the following function to handle different types of responses
Lines 37 to 47 in dcd2f8a
There are two types of responses when we request for file
0. file opens within chrome and we need to download it manually
- file starts downloading automatically
@NavpreetDevpuri I think pyautogui handles only keyboard ,mouse functions , so how do we handle this scenario ?
Good question, try to analyse response headers by using burp suite (by using proxy) and try to find what makes the difference.
And one more way to find out is
When url loads the loading icon disappears and file start downloading resulting into a small download bar at the bottom, we can somehow detect that bar. Its very similar way to how human detects.
@NavpreetDevpuri can we use pygetwindow library for detecting this download window ? pygetwindow comes in the pyautogui library.
We want our library to be used even when we don't having access to native code execution.
For example imagine a situation where our python code only able to see the screen by using TeamViewer or something, then our python code should understand the screen similar to an artificial intelligence.
For example imagine a situation an artificial intelligence robot wants to work with pc screen then that robot will be forced to use image recognition.
Yes we can have two different modes one will have host execution and one will be purely on visual recognition but for now we want our library totally on image recognition.
Using pygetwindow will leads to use host code execution so, we should avoid using it.