Skip to content
This repository was archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
Rebuild project
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislawfortonski committed May 11, 2020
1 parent eaea2eb commit 3c84e6c
Show file tree
Hide file tree
Showing 24 changed files with 233 additions and 65 deletions.
142 changes: 139 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,144 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

geckodriver.log
geckodriver.exe
geckodriver
instagram.txt
ig_test.txt
snap.txt
snap_test.txt
snap.txt
20 changes: 20 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"google": {
"login": "your_google_login",
"password": "your_google_password"
},
"facebook": {
"login": "your_facebook_login",
"password": "your_facebook_password"
},
"login_method": "google",
"match_message": "",
"chance_to_like": 90,
"amount_of_attempts": 15,
"max_wait_time_between_action_in_sec": 45,
"min_wait_time_between_action_in_sec": 10,
"allow_to_save_ig": true,
"ig_file_path": "instagram.txt",
"allow_to_save_snap": true,
"snap_file_path": "snap.txt"
}
24 changes: 0 additions & 24 deletions config.py

This file was deleted.

8 changes: 4 additions & 4 deletions executable-finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Proper Executable

from driver import getDriver
from tinderlogin import TinderLogin
import functions as fn
from instagramfinder import InstagramFinder
from snapchatfinder import SnapchatFinder
from tinder.login.tinderlogin import TinderLogin
import tinder.functions as fn
from tinder.finder.instagramfinder import InstagramFinder
from tinder.finder.snapchatfinder import SnapchatFinder
from selenium.common.exceptions import NoSuchElementException

driver = getDriver()
Expand Down
8 changes: 4 additions & 4 deletions executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from random import random
from driver import getDriver
from tinderlogin import TinderLogin
from tinderbot import TinderBot
from instagramfinder import InstagramFinder
from snapchatfinder import SnapchatFinder
from tinder.login.tinderlogin import TinderLogin
from tinder.tinderbot import TinderBot
from tinder.finder.instagramfinder import InstagramFinder
from tinder.finder.snapchatfinder import SnapchatFinder
from selenium.common.exceptions import NoSuchElementException

driver = getDriver()
Expand Down
20 changes: 20 additions & 0 deletions tests/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"google": {
"login": "your_google_login",
"password": "your_google_password"
},
"facebook": {
"login": "your_facebook_login",
"password": "your_facebook_password"
},
"login_method": "google",
"match_message": "",
"chance_to_like": 90,
"amount_of_attempts": 15,
"max_wait_time_between_action_in_sec": 5,
"min_wait_time_between_action_in_sec": 4,
"allow_to_save_ig": true,
"ig_file_path": "instagram.txt",
"allow_to_save_snap": true,
"snap_file_path": "snap.txt"
}
5 changes: 3 additions & 2 deletions facebooklogin_test.py → tests/facebooklogin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# Date: 02.05.2020
# Login To Facebook Test

import unittest
import sys, unittest
sys.path.insert(0, '..')
from driver import getDriver
from facebooklogin import FacebookLogin
from tinder.login.facebooklogin import FacebookLogin

class TestFacebookLogin(unittest.TestCase):
@classmethod
Expand Down
5 changes: 3 additions & 2 deletions googlelogin_test.py → tests/googlelogin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# Date: 02.05.2020
# Login To Google Test

import unittest
import sys, unittest
sys.path.insert(0, '..')
from driver import getDriver
from googlelogin import GoogleLogin
from tinder.login.googlelogin import GoogleLogin

class TestGoogleLogin(unittest.TestCase):
@classmethod
Expand Down
11 changes: 7 additions & 4 deletions instagramfinder_test.py → tests/instagramfinder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
# Date: 05.05.2020
# Instagram Finder Test

import unittest
import sys, unittest
sys.path.insert(0, '..')
from time import sleep
from tinderlogin import TinderLogin
from instagramfinder import InstagramFinder
from driver import getDriver
from tinder.config import Config
from tinder.login.tinderlogin import TinderLogin
from tinder.finder.instagramfinder import InstagramFinder


class TestIntagramFinder(unittest.TestCase):
@classmethod
Expand All @@ -32,7 +35,7 @@ def changeNameScript(self, name):
sleep(5)

def testInstagramSaving(self):
testFileName = 'ig_test.txt'
testFileName = Config['ig_file_path']
with open(testFileName, 'w') as file:
file.write('')

Expand Down
10 changes: 6 additions & 4 deletions snapchatfinder_test.py → tests/snapchatfinder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
# Date: 06.05.2020
# Snapchat Finder Test

import unittest
import sys, unittest
sys.path.insert(0, '..')
from time import sleep
from tinderlogin import TinderLogin
from snapchatfinder import SnapchatFinder
from driver import getDriver
from tinder.config import Config
from tinder.login.tinderlogin import TinderLogin
from tinder.finder.snapchatfinder import SnapchatFinder
from selenium.common.exceptions import JavascriptException

class TestSnapchatFinder(unittest.TestCase):
Expand All @@ -33,7 +35,7 @@ def changeNameScript(self, name):
sleep(5)

def testSnapSaving(self):
testFileName = 'snap_test.txt'
testFileName = Config['snap_file_path']
with open(testFileName, 'w') as file:
file.write('')

Expand Down
7 changes: 4 additions & 3 deletions tinderbot_test.py → tests/tinderbot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# Date: 02.05.2020
# Tinder Bot Test

import unittest
import sys, unittest
sys.path.insert(0, '..')
from time import sleep
from tinderlogin import TinderLogin
from tinderbot import TinderBot
from driver import getDriver
from tinder.login.tinderlogin import TinderLogin
from tinder.tinderbot import TinderBot

class TestTinderBot(unittest.TestCase):
@classmethod
Expand Down
5 changes: 3 additions & 2 deletions tinderlogin_test.py → tests/tinderlogin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# Date: 02.05.2020
# Login To Tinder Test

import unittest
import sys, unittest
sys.path.insert(0, '..')
from driver import getDriver
from tinderlogin import TinderLogin
from tinder.login.tinderlogin import TinderLogin

class TestTinderLogin(unittest.TestCase):
def setUp(self):
Expand Down
Empty file added tinder/__init__.py
Empty file.
8 changes: 8 additions & 0 deletions tinder/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Author: Stan Fortoński
# Date: 02.05.2020
# Config

import json

with open('config.json') as file:
Config = json.load(file)
Empty file added tinder/finder/__init__.py
Empty file.
File renamed without changes.
4 changes: 2 additions & 2 deletions instagramfinder.py → tinder/finder/instagramfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Date: 05.05.2020
# Instagram Finder

from config import Config
from finder import Finder
from tinder.config import Config
from tinder.finder.finder import Finder

class InstagramFinder(Finder):
def __init__(self, driver):
Expand Down
4 changes: 2 additions & 2 deletions snapchatfinder.py → tinder/finder/snapchatfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Date: 06.05.2020
# Snapchat Finder

from config import Config
from finder import Finder
from tinder.config import Config
from tinder.finder.finder import Finder

class SnapchatFinder(Finder):
def __init__(self, driver):
Expand Down
Loading

0 comments on commit 3c84e6c

Please sign in to comment.