Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle insta cookies #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

beranPro
Copy link

@beranPro beranPro commented Mar 3, 2021

Hi,
when i checked out this repo and tried to used this over docker-compose, folling error ocurred:

https://github.com/timgrossmann/InstaPy/issues/5882

I just the last answer from the ticket above in this pull request.

@elulcao
Copy link
Contributor

elulcao commented Mar 4, 2021

The main idea for using Docker is to automate all the installation and execution in the isolated container. Adding extra Python modules is defeating the portability of this repo.
The requirements.txt has *.13 version which could be (maybe not) out of date from the latest commit in InstaPy repo.

Instead of pushing individual changes to this repo, a better approach is just to map the file to your local container.

@beranPro
Copy link
Author

beranPro commented Mar 5, 2021

Hi,
but then we need to update the documentation because the docker-compose stuff is not working on Windows with the current state of this repository.

@elulcao
Copy link
Contributor

elulcao commented Mar 5, 2021

Hi,
but then we need to update the documentation because the docker-compose stuff is not working on Windows with the current state of this repository.

You can map the new file from InstaPy repo to your container.
I will start a new PR for the new .14 version to reflect the changes in instapy-docker.

@@ -9,3 +9,4 @@ services:
- INSTAPY_WORKSPACE=/code/InstaPy
volumes:
- ./:/code
../login_util.py:/usr/local/lib/python3.7/site-packages/instapy/login_util.py

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A - is missing here

Copy link

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR contains some errors in running on Linux mint.

In addition, I have this error that I think is related

➜  docker-compose git:(beranPro-handleInstaCookies) ✗ docker-compose up --build
Starting instapy_web ... done
Attaching to instapy_web
web_1  | INFO [2021-07-19 10:39:52] [new_vincenzo.palazzo]  Session started!
web_1  | INFO [2021-07-19 10:39:52] [new_vincenzo.palazzo]  -- Connection Checklist [1/2] (Internet Connection Status)
web_1  | INFO [2021-07-19 10:39:53] [new_vincenzo.palazzo]  - Internet Connection Status: ok
web_1  | INFO [2021-07-19 10:39:53] [new_vincenzo.palazzo]  - Current IP is "79.36.113.69" and it's from "Italy/IT"
web_1  | INFO [2021-07-19 10:39:53] [new_vincenzo.palazzo]  -- Connection Checklist [2/2] (Hide Selenium Extension)
web_1  | INFO [2021-07-19 10:39:53] [new_vincenzo.palazzo]  - window.navigator.webdriver response: True
web_1  | WARNING [2021-07-19 10:39:53] [new_vincenzo.palazzo]  - Hide Selenium Extension: error
web_1  | INFO [2021-07-19 10:39:56] [new_vincenzo.palazzo]  - Cookie file not found, creating cookie...
web_1  | INFO [2021-07-19 10:40:41] [new_vincenzo.palazzo]  Timed out with failure while explicitly waiting until visibility of element located!
web_1  | 
web_1  | INFO [2021-07-19 10:40:46] [new_vincenzo.palazzo]  Sessional Live Report:
web_1  | 	|> No any statistics to show
web_1  | 
web_1  | 
web_1  | [Session lasted 57.27 seconds]
web_1  | INFO [2021-07-19 10:40:46] [new_vincenzo.palazzo]  Session ended!
web_1  | InstaPy Version: 0.6.13
web_1  |  ._.  ._.  ._.  ._.  ._.  ._.  ._. 
web_1  | Workspace in use: "/code/InstaPy"
web_1  | OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
web_1  | oooooooooooooooooooooooooooooooooooooooooooooooooooooo
web_1  | **********************************************************************
web_1  | If raising an issue, please also upload the file located at:
web_1  | /tmp/20210719-104046.html
web_1  | **********************************************************************
web_1  | 
web_1  | OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
web_1  | ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
web_1  | 
web_1  | 
web_1  | 
web_1  | Traceback (most recent call last):
web_1  |   File "docker_quickstart.py", line 19, in <module>
web_1  |     with smart_run(bot):
web_1  |   File "/usr/local/lib/python3.7/contextlib.py", line 114, in __enter__
web_1  |     raise RuntimeError("generator didn't yield") from None
web_1  | RuntimeError: generator didn't yield
instapy_web exited with code 1

@shoesack
Copy link

This issue still happens using docker-compose on debian 10 even using the mentioned workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants