Skip to content

Commit

Permalink
Added Release Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
thetseffect committed May 19, 2020
1 parent 5ead2f2 commit 819e40b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/env
/data
/test_data
/driver
__pycache__
.vscode
credentials.py
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

### ⚠️ Caution: Not meant for commercial or spamming purposes, created for educational and learning purpose only.

## Steps to Create a Release (.exe) using PyInstaller:
1. Run ```pip install pyinstaller``` to install Pyinstaller.
2. Run the following command to create a the build (.exe) : ```pyinstaller ./main.py --onefile --icon=favicon.ico --add-binary "./driver/chromedriver.exe;./driver"```
3. This creates 2 directories namely *build* and *dist*.
4. Go to *dist* and open main.exe.

## Steps to Run Locally (Tested on Python 3.6)
1. Clone the repo.
2. Navigate to the cloned directory.
Expand Down
Binary file added favicon.ico
Binary file not shown.
11 changes: 10 additions & 1 deletion igbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains


import os
import glob
import json
Expand All @@ -15,14 +16,22 @@
from random import randrange
from tqdm import tqdm

def resource_path(relative_path):
try:
base_path = sys._MEIPASS
except Exception:
base_path = os.path.dirname(__file__)
return os.path.join(base_path, relative_path)


class InstaBot:
def __init__(self, username, password):
self.username = username
self.password = password
self.isLoggedIn = False

def _login(self):
self.driver = webdriver.Chrome()
self.driver = webdriver.Chrome(resource_path('./driver/chromedriver.exe'))
self.driver.get("https://instagram.com")
sleep(2)
self.driver.find_element_by_xpath(
Expand Down
6 changes: 6 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
warnings.filterwarnings('ignore')


# Note: UNCOMMENT ANY PART 1. For Working on GUI or 2. Working on development.


# FOR GENERATING RELEASE ==============================================================================================

root = Tk()
root.title("InstaBot")

Expand All @@ -30,6 +35,7 @@ def start_process():
root.mainloop()


# FOR DEVELOPMENT ======================================================================================================

#Initilize Bot
# bot = InstaBot(username_2, password_2)
Expand Down

0 comments on commit 819e40b

Please sign in to comment.