├── 2FA_DEV ├── HAVE NOT TESTED BUT SHOULD WORK.txt ├── requirements.txt ├── DEV_requirements.txt ├── DEV_auth.py └── config_setup.py ├── Historic ├── Version - 3.2.1 │ ├── upload_log.txt │ ├── 2FA_DEV │ │ ├── HAVE NOT TESTED BUT SHOULD WORK.txt │ │ ├── DEV_requirements.txt │ │ └── DEV_auth.py │ ├── version.txt │ ├── requirements.txt │ ├── input_helpers.py │ ├── LICENSE │ ├── status.json │ ├── default_comments.py │ ├── auth.py │ └── dashboard.py ├── Version 2 - 72024 │ ├── upload_log.txt │ ├── requirements.txt │ ├── __pycache__ │ │ ├── scrape.cpython-312.pyc │ │ └── utils.cpython-312.pyc │ ├── input_helpers.py │ ├── LICENSE │ ├── auth.py │ ├── scrape.py │ ├── README.md │ ├── config_setup.py │ ├── dashboard.py │ ├── main.py │ └── utils.py ├── Version 1 - 71820024 │ ├── upload_log.txt │ ├── requirements.txt │ ├── input_helpers.py │ ├── config.yaml │ ├── auth.py │ ├── scrape.py │ ├── utils.py │ ├── config_setup.py │ ├── main.py │ └── dashboard.py ├── Version 2.2 - 7282024 │ ├── upload_log.txt │ ├── requirements.txt │ ├── input_helpers.py │ ├── LICENSE │ ├── auth.py │ ├── scrape.py │ ├── config_setup.py │ ├── dashboard.py │ └── utils.py ├── Version 3.1.1 (2) │ ├── 2FA_DEV │ │ ├── Should work not tested as all accs I use 2fa off.txt │ │ ├── requirements.txt │ │ └── config_setup.py │ ├── version.txt │ ├── requirements.txt │ ├── input_helpers.py │ ├── LICENSE │ ├── default_comments.py │ ├── dashboard.py │ └── default_descriptions.py ├── Version 3.0 - 852024 │ ├── version.txt │ ├── requirements.txt │ ├── input_helpers.py │ ├── LICENSE │ ├── default_comments.py │ ├── dashboard.py │ └── scrape.py ├── Version 3.1 81424 │ ├── version.txt │ ├── requirements.txt │ ├── input_helpers.py │ ├── default_comments.py │ ├── dashboard.py │ └── scrape.py └── Version 3.2.0 - 92224 │ ├── version.txt │ ├── requirements.txt │ ├── input_helpers.py │ ├── default_comments.py │ ├── auth.py │ └── dashboard.py ├── version.txt ├── requirements.txt ├── input_helpers.py ├── configs └── USERNAE_config.yaml ├── LICENSE ├── user_sessions └── Test.json ├── default_comments.py ├── auth.py └── dashboard.py /2FA_DEV/HAVE NOT TESTED BUT SHOULD WORK.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/upload_log.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/upload_log.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/upload_log.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Historic/Version 2.2 - 7282024/upload_log.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/2FA_DEV/HAVE NOT TESTED BUT SHOULD WORK.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/2FA_DEV/Should work not tested as all accs I use 2fa off.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy -------------------------------------------------------------------------------- /Historic/Version 2.2 - 7282024/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/__pycache__/scrape.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sujay1599/InstagramTheftyScraperPosterHuman/HEAD/Historic/Version 2 - 72024/__pycache__/scrape.cpython-312.pyc -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/__pycache__/utils.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sujay1599/InstagramTheftyScraperPosterHuman/HEAD/Historic/Version 2 - 72024/__pycache__/utils.cpython-312.pyc -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/version.txt: -------------------------------------------------------------------------------- 1 | { 2 | "created_by": "Sujay1599", 3 | "program_name": "InstagramTheftyScraperPosterHuman", 4 | "version": "3.2.1", 5 | "working_as_of": "2024-09-22" 6 | } -------------------------------------------------------------------------------- /Historic/Version 3.0 - 852024/version.txt: -------------------------------------------------------------------------------- 1 | { 2 | "created_by": "Sujay1599", 3 | "program_name": "InstgramTheftyScraperPosterHuman", 4 | "version": "3.0.1", 5 | "working_as_of": "8/10/2024" 6 | } -------------------------------------------------------------------------------- /Historic/Version 3.1 81424/version.txt: -------------------------------------------------------------------------------- 1 | { 2 | "created_by": "Sujay1599", 3 | "program_name": "InstgramTheftyScraperPosterHuman", 4 | "version": "3.0.1", 5 | "working_as_of": "8/10/2024" 6 | } -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/version.txt: -------------------------------------------------------------------------------- 1 | { 2 | "created_by": "Sujay1599", 3 | "program_name": "InstagramTheftyScraperPosterHuman", 4 | "version": "3.1.1", 5 | "working_as_of": "2024-08-22" 6 | } 7 | -------------------------------------------------------------------------------- /Historic/Version 3.2.0 - 92224/version.txt: -------------------------------------------------------------------------------- 1 | { 2 | "created_by": "Sujay1599", 3 | "program_name": "InstagramTheftyScraperPosterHuman", 4 | "version": "3.2.0", 5 | "working_as_of": "2024-09-05" 6 | } 7 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | { 2 | "created_by": "Sujay1599", 3 | "program_name": "InstagramTheftyScraperPosterHuman", 4 | "version": "3.2.2", 5 | "working_as_of": "2024-10-10", 6 | "changes": [ 7 | "Fixed loop error during scraping phase", 8 | "Improved error handling and graceful exit during scraping" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel 25 | python-dotenv ##2fa -------------------------------------------------------------------------------- /Historic/Version 3.0 - 852024/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel -------------------------------------------------------------------------------- /Historic/Version 3.1 81424/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel -------------------------------------------------------------------------------- /2FA_DEV/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel 25 | python-dotenv ## 2FA -------------------------------------------------------------------------------- /2FA_DEV/DEV_requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel 25 | python-dotenv ## 2FA -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel 25 | python-dotenv ##2fa -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel 25 | python-dotenv ##2fa -------------------------------------------------------------------------------- /Historic/Version 3.2.0 - 92224/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel 25 | python-dotenv ##2fa -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/2FA_DEV/requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel 25 | python-dotenv ## 2FA -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/2FA_DEV/DEV_requirements.txt: -------------------------------------------------------------------------------- 1 | instagrapi 2 | cryptography 3 | pyyaml 4 | rich 5 | moviepy 6 | certifi 7 | chardet 8 | decorator 9 | idna 10 | imageio 11 | imageio-ffmpeg 12 | numpy 13 | Pillow 14 | pip 15 | proglog 16 | pycryptodomex 17 | pydantic 18 | PySocks 19 | requests 20 | setuptools 21 | tqdm 22 | typing-extensions 23 | urllib3 24 | wheel 25 | python-dotenv ## 2FA -------------------------------------------------------------------------------- /input_helpers.py: -------------------------------------------------------------------------------- 1 | def get_input(prompt, input_type=str, retries=3): 2 | while retries > 0: 3 | try: 4 | return input_type(input(prompt)) 5 | except ValueError: 6 | print(f"Invalid input. Please enter a valid {input_type.__name__}.") 7 | retries -= 1 8 | raise ValueError("Too many invalid attempts.") 9 | 10 | def get_boolean_input(prompt): 11 | return input(prompt).strip().lower() in ['true', 'yes', 'y'] 12 | -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/input_helpers.py: -------------------------------------------------------------------------------- 1 | def get_input(prompt, input_type=str, retries=3): 2 | while retries > 0: 3 | try: 4 | return input_type(input(prompt)) 5 | except ValueError: 6 | print(f"Invalid input. Please enter a valid {input_type.__name__}.") 7 | retries -= 1 8 | raise ValueError("Too many invalid attempts.") 9 | 10 | def get_boolean_input(prompt): 11 | return input(prompt).strip().lower() in ['true', 'yes', 'y'] 12 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/input_helpers.py: -------------------------------------------------------------------------------- 1 | def get_input(prompt, input_type=str, retries=3): 2 | while retries > 0: 3 | try: 4 | return input_type(input(prompt)) 5 | except ValueError: 6 | print(f"Invalid input. Please enter a valid {input_type.__name__}.") 7 | retries -= 1 8 | raise ValueError("Too many invalid attempts.") 9 | 10 | def get_boolean_input(prompt): 11 | return input(prompt).strip().lower() in ['true', 'yes', 'y'] 12 | -------------------------------------------------------------------------------- /Historic/Version 3.1 81424/input_helpers.py: -------------------------------------------------------------------------------- 1 | def get_input(prompt, input_type=str, retries=3): 2 | while retries > 0: 3 | try: 4 | return input_type(input(prompt)) 5 | except ValueError: 6 | print(f"Invalid input. Please enter a valid {input_type.__name__}.") 7 | retries -= 1 8 | raise ValueError("Too many invalid attempts.") 9 | 10 | def get_boolean_input(prompt): 11 | return input(prompt).strip().lower() in ['true', 'yes', 'y'] 12 | -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/input_helpers.py: -------------------------------------------------------------------------------- 1 | def get_input(prompt, input_type=str, retries=3): 2 | while retries > 0: 3 | try: 4 | return input_type(input(prompt)) 5 | except ValueError: 6 | print(f"Invalid input. Please enter a valid {input_type.__name__}.") 7 | retries -= 1 8 | raise ValueError("Too many invalid attempts.") 9 | 10 | def get_boolean_input(prompt): 11 | return input(prompt).strip().lower() in ['true', 'yes', 'y'] 12 | -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/input_helpers.py: -------------------------------------------------------------------------------- 1 | def get_input(prompt, input_type=str, retries=3): 2 | while retries > 0: 3 | try: 4 | return input_type(input(prompt)) 5 | except ValueError: 6 | print(f"Invalid input. Please enter a valid {input_type.__name__}.") 7 | retries -= 1 8 | raise ValueError("Too many invalid attempts.") 9 | 10 | def get_boolean_input(prompt): 11 | return input(prompt).strip().lower() in ['true', 'yes', 'y'] 12 | -------------------------------------------------------------------------------- /Historic/Version 2.2 - 7282024/input_helpers.py: -------------------------------------------------------------------------------- 1 | def get_input(prompt, input_type=str, retries=3): 2 | while retries > 0: 3 | try: 4 | return input_type(input(prompt)) 5 | except ValueError: 6 | print(f"Invalid input. Please enter a valid {input_type.__name__}.") 7 | retries -= 1 8 | raise ValueError("Too many invalid attempts.") 9 | 10 | def get_boolean_input(prompt): 11 | return input(prompt).strip().lower() in ['true', 'yes', 'y'] 12 | -------------------------------------------------------------------------------- /Historic/Version 3.0 - 852024/input_helpers.py: -------------------------------------------------------------------------------- 1 | def get_input(prompt, input_type=str, retries=3): 2 | while retries > 0: 3 | try: 4 | return input_type(input(prompt)) 5 | except ValueError: 6 | print(f"Invalid input. Please enter a valid {input_type.__name__}.") 7 | retries -= 1 8 | raise ValueError("Too many invalid attempts.") 9 | 10 | def get_boolean_input(prompt): 11 | return input(prompt).strip().lower() in ['true', 'yes', 'y'] 12 | -------------------------------------------------------------------------------- /Historic/Version 3.2.0 - 92224/input_helpers.py: -------------------------------------------------------------------------------- 1 | def get_input(prompt, input_type=str, retries=3): 2 | while retries > 0: 3 | try: 4 | return input_type(input(prompt)) 5 | except ValueError: 6 | print(f"Invalid input. Please enter a valid {input_type.__name__}.") 7 | retries -= 1 8 | raise ValueError("Too many invalid attempts.") 9 | 10 | def get_boolean_input(prompt): 11 | return input(prompt).strip().lower() in ['true', 'yes', 'y'] 12 | -------------------------------------------------------------------------------- /configs/USERNAE_config.yaml: -------------------------------------------------------------------------------- 1 | custom_tags: 2 | - 1min 3 | - LongerVideos 4 | - swifttok 5 | - FallGuysMoments 6 | - MakeupInspo 7 | - PaTiChallenge 8 | - ForYourPride 9 | - ohno 10 | - anime 11 | - FilmTok 12 | - Fashionista 13 | - ShoppingTherapy 14 | - BeautyDay 15 | - SportsPhotography 16 | - EntertainmentNews 17 | - GreenEnergy 18 | - EcoFriendly 19 | - MentalHealthMatters 20 | - DigitalArt 21 | - TravelGoals 22 | deleting: 23 | delete_interval_minutes: 900000 24 | description: 25 | credit: 26 | give_credit: false 27 | custom_description: '' 28 | hashtags: 29 | use_hashtags: false 30 | use_original: false 31 | instagram: 32 | password: USERNAME 33 | username: PASSWORD 34 | key: 4m5-343453145358231= 35 | leave_comment: false 36 | proxy: '' 37 | scraping: 38 | enabled: true 39 | like_reels: false 40 | num_reels: 3 41 | profiles: fatboydegen69 sanitypun terrible_christian_memer 42 | scrape_interval_minutes: 60000 43 | uploading: 44 | add_to_story: false 45 | enabled: false 46 | upload_interval_minutes: 24 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 sujay1599 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 sujay1599 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 sujay1599 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 sujay1599 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Historic/Version 2.2 - 7282024/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 sujay1599 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Historic/Version 3.0 - 852024/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 sujay1599 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /user_sessions/Test.json: -------------------------------------------------------------------------------- 1 | { 2 | "uuids": { 3 | "phone_id": "893fc468-bb3e-4a93-b870-967cb719a307", 4 | "uuid": "79fc1e96-3cfc-41af-a6e0-363ba45c7f75", 5 | "client_session_id": "", 6 | "advertising_id": "", 7 | "android_device_id": "", 8 | "request_id": "", 9 | "tray_session_id": "" 10 | }, 11 | "mid": "", 12 | "ig_u_rur": null, 13 | "ig_www_claim": null, 14 | "authorization_data": { 15 | "ds_user_id": "", 16 | "sessionid": "" 17 | }, 18 | "cookies": {}, 19 | "last_login": 0.2583410, 20 | "device_settings": { 21 | "app_version": "269.0.0.18.75", 22 | "android_version": 26, 23 | "android_release": "8.0.0", 24 | "dpi": "480dpi", 25 | "resolution": "1080x1920", 26 | "manufacturer": "OnePlus", 27 | "device": "devitron", 28 | "model": "6T Dev", 29 | "cpu": "qcom", 30 | "version_code": "314665256" 31 | }, 32 | "user_agent": "Instagram 269.0.0.18.75 Android (26/8.0.0; 480dpi; 1080x1920; OnePlus; 6T Dev; devitron; qcom; en_US; 314665256)", 33 | "country": "US", 34 | "country_code": 1, 35 | "locale": "en_US", 36 | "timezone_offset": -14400 37 | } -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/status.json: -------------------------------------------------------------------------------- 1 | { 2 | "last_scrape_time": 1728516853.670676, 3 | "next_scrape_time": 0, 4 | "reels_scraped": [ 5 | "toilettaleland_3462214515277018106", 6 | "toilettaleland_3462214673360403479", 7 | "toilettaleland_3462214580632794701" 8 | ], 9 | "last_upload_time": 1728620279.9515169, 10 | "next_upload_time": 1728622379.9515169, 11 | "last_story_upload_time": 0, 12 | "next_story_upload_time": 0, 13 | "last_delete_time": 0, 14 | "random_upload_times": [], 15 | "random_waits": [], 16 | "next_file_to_upload": "N/A", 17 | "reels_uploaded": [ 18 | "thebrowncheezey_3463396244976844461", 19 | "binbros.co_3472597772844590820", 20 | "thebrowncheezey_3463573964876722016", 21 | "olympicwagers_3471697600002497328", 22 | "olympicwagers_3469330698697506634", 23 | "binbros.co_3471011286484720179", 24 | "uncrustable.memess_3462541300765883125", 25 | "somequeeninmarketing_3464474105959096010", 26 | "uncrustable.memess_3462485510977981205", 27 | "binbros.co_3472313856196874488", 28 | "laxative_3466179510729932886", 29 | "olympicwagers_3472151992283452999", 30 | "viral_clipsco", 31 | "chris_carsalesman" 32 | ] 33 | } -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/config.yaml: -------------------------------------------------------------------------------- 1 | credit: 2 | give_credit: false 3 | custom_tags: 4 | - instagram 5 | - instadaily 6 | - LikeForFollow 7 | - LikesForLikes 8 | - LikeForLikes 9 | - FollowForFollow 10 | - LikeForLike 11 | - FollowForFollowBack 12 | - FollowBack 13 | - FollowMe 14 | - instalike 15 | - comment 16 | - follow 17 | - memes 18 | - funnymemes 19 | - memestagram 20 | - dankmemes 21 | - memelord 22 | - instamemes 23 | - instagood 24 | - love 25 | - photooftheday 26 | - picoftheday 27 | - likeforlikes 28 | - likes 29 | - followme 30 | - photography 31 | - beautiful 32 | - fashion 33 | - smile 34 | - me 35 | - followforfollowback 36 | - l 37 | - likeforfollow 38 | - myself 39 | - likeforlike 40 | - bhfyp 41 | - f 42 | - followback 43 | - followers 44 | - followforfollow 45 | - style 46 | - photo 47 | - happy 48 | - instamood 49 | - nature 50 | - trending 51 | - art 52 | - india 53 | - viral 54 | - explore 55 | - model 56 | - travel 57 | deleting: 58 | delete_interval_minutes: 900 59 | description: 60 | use_original: true 61 | hashtags: 62 | use_hashtags: false 63 | instagram: 64 | password: 65 | username: 66 | key: 67 | leave_comment: false 68 | scraping: 69 | enabled: false 70 | like_reels: false 71 | num_reels: 5 72 | profiles: acc1, acc2, ac.c3 etc 73 | scrape_interval_minutes: 600 74 | uploading: 75 | add_to_story: false 76 | enabled: true 77 | upload_interval_minutes: 45 78 | -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/auth.py: -------------------------------------------------------------------------------- 1 | from cryptography.fernet import Fernet 2 | from instagrapi import Client 3 | import os 4 | import logging 5 | 6 | def decrypt_credentials(config): 7 | key = config['key'].encode() 8 | cipher_suite = Fernet(key) 9 | username = cipher_suite.decrypt(config['instagram']['username'].encode()).decode() 10 | password = cipher_suite.decrypt(config['instagram']['password'].encode()).decode() 11 | return username, password 12 | 13 | def login(client, username, password, session_file): 14 | if os.path.exists(session_file): 15 | try: 16 | client.load_settings(session_file) 17 | client.login(username, password) 18 | logging.info("Logged in using session file - {username}") 19 | except Exception as e: 20 | logging.error(f"Failed to login using session file: {e}") 21 | _login_with_credentials(client, username, password, session_file) 22 | else: 23 | _login_with_credentials(client, username, password, session_file) 24 | 25 | def _login_with_credentials(client, username, password, session_file): 26 | try: 27 | client.login(username, password) 28 | client.dump_settings(session_file) 29 | logging.info("Logged in using username and password, session file created - {username}") 30 | except Exception as e: 31 | logging.error(f"Username/password login failed: {e}") 32 | exit(1) 33 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/auth.py: -------------------------------------------------------------------------------- 1 | from cryptography.fernet import Fernet 2 | from instagrapi import Client 3 | import os 4 | from rich.logging import RichHandler 5 | import logging 6 | 7 | # Configure logging with Rich 8 | logging.basicConfig( 9 | level=logging.INFO, 10 | format="%(message)s", 11 | datefmt="[%X]", 12 | handlers=[RichHandler(rich_tracebacks=True)] 13 | ) 14 | 15 | def decrypt_credentials(config): 16 | key = config['key'].encode() 17 | cipher_suite = Fernet(key) 18 | username = cipher_suite.decrypt(config['instagram']['username'].encode()).decode() 19 | password = cipher_suite.decrypt(config['instagram']['password'].encode()).decode() 20 | return username, password 21 | 22 | def login(client, username, password, session_file): 23 | if os.path.exists(session_file): 24 | try: 25 | client.load_settings(session_file) 26 | client.login(username, password) 27 | # Check session validity 28 | client.get_timeline_feed() 29 | logging.info(f"[bold blue]Logged in using session file - {username}[/bold blue]") 30 | except Exception as e: 31 | logging.error(f"[bold red]Failed to login using session file: {e}[/bold red]") 32 | _login_with_credentials(client, username, password, session_file) 33 | else: 34 | _login_with_credentials(client, username, password, session_file) 35 | 36 | def _login_with_credentials(client, username, password, session_file): 37 | try: 38 | client.login(username, password) 39 | client.dump_settings(session_file) 40 | logging.info(f"[bold blue]Logged in using username and password, session file created - {username}[/bold blue]") 41 | except Exception as e: 42 | logging.error(f"[bold red]Username/password login failed: {e}[/bold red]") 43 | exit(1) 44 | 45 | def main(config): 46 | client = Client() 47 | username, password = decrypt_credentials(config) 48 | session_file = 'session.json' 49 | 50 | # Load existing session or login 51 | login(client, username, password, session_file) 52 | 53 | # Ensure UUIDs are reused 54 | if os.path.exists(session_file): 55 | old_session = client.get_settings() 56 | client.set_uuids(old_session["uuids"]) 57 | 58 | return client 59 | -------------------------------------------------------------------------------- /default_comments.py: -------------------------------------------------------------------------------- 1 | # default_comments.py 2 | 3 | DEFAULT_COMMENTS = [ 4 | """This is awesome, thanks for sharing!""", 5 | """Seriously made my day better!""", 6 | """I couldn’t agree more with this!""", 7 | """Just wow. Loving this!""", 8 | """This is really cool, love it!""", 9 | """Such a great post, well done!""", 10 | """This is so relatable, love it!""", 11 | """Couldn’t have said it better myself!""", 12 | """Nailed it with this one!""", 13 | """Absolutely fantastic, great job!""", 14 | """This really speaks to me!""", 15 | """Thanks for the inspiration!""", 16 | """Really enjoyed this, well done!""", 17 | """This is exactly what I needed today!""", 18 | """You’ve got a new fan right here!""", 19 | """This made me smile, thank you!""", 20 | """So glad I saw this today!""", 21 | """This is pure gold, seriously!""", 22 | """Totally agree with this!""", 23 | """Just had to share this, it’s too good!""", 24 | """This is spot on, well done!""", 25 | """Really impressive work here!""", 26 | """Love the vibe of this post!""", 27 | """This is incredibly well done!""", 28 | """Just what I needed to see today!""", 29 | """This is top-notch content, thank you!""", 30 | """Exactly what I was thinking, great post!""", 31 | """So true, I can totally relate!""", 32 | """This just made my day a lot better!""", 33 | """Amazing work, keep it up!""", 34 | """This is something special, well done!""", 35 | """You really nailed it with this!""", 36 | """This is going on my list of favorites!""", 37 | """Can’t get enough of this!""", 38 | """This is the kind of content I’m here for!""", 39 | """Wow, just wow. This is great!""", 40 | """This one really hit home for me!""", 41 | """Such a solid post, love it!""", 42 | """This is why I love following you!""", 43 | """Such a good post, really enjoyed it!""", 44 | """So glad I didn’t miss this, amazing!""", 45 | """This is definitely getting a share from me!""", 46 | """Had to stop and comment, this is great!""", 47 | """This one really stands out, love it!""", 48 | """This is seriously good stuff, thanks!""", 49 | """Just had to say, this is awesome!""", 50 | """This is definitely one of my favorites!""", 51 | """This really made me think, great post!""", 52 | """This is quality content right here!""", 53 | """Really loving what you’re doing here!""", 54 | """Had to share this, it’s just too good!""", 55 | """This post is exactly what I needed today!""", 56 | """Can’t wait to see more like this!""", 57 | """You’re killing it with these posts!""", 58 | """This is just perfect, well done!""", 59 | ] 60 | -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/default_comments.py: -------------------------------------------------------------------------------- 1 | # default_comments.py 2 | 3 | DEFAULT_COMMENTS = [ 4 | """This is awesome, thanks for sharing!""", 5 | """Seriously made my day better!""", 6 | """I couldn’t agree more with this!""", 7 | """Just wow. Loving this!""", 8 | """This is really cool, love it!""", 9 | """Such a great post, well done!""", 10 | """This is so relatable, love it!""", 11 | """Couldn’t have said it better myself!""", 12 | """Nailed it with this one!""", 13 | """Absolutely fantastic, great job!""", 14 | """This really speaks to me!""", 15 | """Thanks for the inspiration!""", 16 | """Really enjoyed this, well done!""", 17 | """This is exactly what I needed today!""", 18 | """You’ve got a new fan right here!""", 19 | """This made me smile, thank you!""", 20 | """So glad I saw this today!""", 21 | """This is pure gold, seriously!""", 22 | """Totally agree with this!""", 23 | """Just had to share this, it’s too good!""", 24 | """This is spot on, well done!""", 25 | """Really impressive work here!""", 26 | """Love the vibe of this post!""", 27 | """This is incredibly well done!""", 28 | """Just what I needed to see today!""", 29 | """This is top-notch content, thank you!""", 30 | """Exactly what I was thinking, great post!""", 31 | """So true, I can totally relate!""", 32 | """This just made my day a lot better!""", 33 | """Amazing work, keep it up!""", 34 | """This is something special, well done!""", 35 | """You really nailed it with this!""", 36 | """This is going on my list of favorites!""", 37 | """Can’t get enough of this!""", 38 | """This is the kind of content I’m here for!""", 39 | """Wow, just wow. This is great!""", 40 | """This one really hit home for me!""", 41 | """Such a solid post, love it!""", 42 | """This is why I love following you!""", 43 | """Such a good post, really enjoyed it!""", 44 | """So glad I didn’t miss this, amazing!""", 45 | """This is definitely getting a share from me!""", 46 | """Had to stop and comment, this is great!""", 47 | """This one really stands out, love it!""", 48 | """This is seriously good stuff, thanks!""", 49 | """Just had to say, this is awesome!""", 50 | """This is definitely one of my favorites!""", 51 | """This really made me think, great post!""", 52 | """This is quality content right here!""", 53 | """Really loving what you’re doing here!""", 54 | """Had to share this, it’s just too good!""", 55 | """This post is exactly what I needed today!""", 56 | """Can’t wait to see more like this!""", 57 | """You’re killing it with these posts!""", 58 | """This is just perfect, well done!""", 59 | ] 60 | -------------------------------------------------------------------------------- /Historic/Version 3.2.0 - 92224/default_comments.py: -------------------------------------------------------------------------------- 1 | # default_comments.py 2 | 3 | DEFAULT_COMMENTS = [ 4 | """This is awesome, thanks for sharing!""", 5 | """Seriously made my day better!""", 6 | """I couldn’t agree more with this!""", 7 | """Just wow. Loving this!""", 8 | """This is really cool, love it!""", 9 | """Such a great post, well done!""", 10 | """This is so relatable, love it!""", 11 | """Couldn’t have said it better myself!""", 12 | """Nailed it with this one!""", 13 | """Absolutely fantastic, great job!""", 14 | """This really speaks to me!""", 15 | """Thanks for the inspiration!""", 16 | """Really enjoyed this, well done!""", 17 | """This is exactly what I needed today!""", 18 | """You’ve got a new fan right here!""", 19 | """This made me smile, thank you!""", 20 | """So glad I saw this today!""", 21 | """This is pure gold, seriously!""", 22 | """Totally agree with this!""", 23 | """Just had to share this, it’s too good!""", 24 | """This is spot on, well done!""", 25 | """Really impressive work here!""", 26 | """Love the vibe of this post!""", 27 | """This is incredibly well done!""", 28 | """Just what I needed to see today!""", 29 | """This is top-notch content, thank you!""", 30 | """Exactly what I was thinking, great post!""", 31 | """So true, I can totally relate!""", 32 | """This just made my day a lot better!""", 33 | """Amazing work, keep it up!""", 34 | """This is something special, well done!""", 35 | """You really nailed it with this!""", 36 | """This is going on my list of favorites!""", 37 | """Can’t get enough of this!""", 38 | """This is the kind of content I’m here for!""", 39 | """Wow, just wow. This is great!""", 40 | """This one really hit home for me!""", 41 | """Such a solid post, love it!""", 42 | """This is why I love following you!""", 43 | """Such a good post, really enjoyed it!""", 44 | """So glad I didn’t miss this, amazing!""", 45 | """This is definitely getting a share from me!""", 46 | """Had to stop and comment, this is great!""", 47 | """This one really stands out, love it!""", 48 | """This is seriously good stuff, thanks!""", 49 | """Just had to say, this is awesome!""", 50 | """This is definitely one of my favorites!""", 51 | """This really made me think, great post!""", 52 | """This is quality content right here!""", 53 | """Really loving what you’re doing here!""", 54 | """Had to share this, it’s just too good!""", 55 | """This post is exactly what I needed today!""", 56 | """Can’t wait to see more like this!""", 57 | """You’re killing it with these posts!""", 58 | """This is just perfect, well done!""", 59 | ] 60 | -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/scrape.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import random 3 | import os 4 | from time import sleep 5 | from datetime import datetime, timedelta 6 | from utils import update_status, random_sleep, sleep_with_progress_bar 7 | 8 | def perform_human_actions(client, tags): 9 | random_tag = random.choice(tags) 10 | logging.info(f"Performing human-like actions on tag: {random_tag}") 11 | try: 12 | medias = client.hashtag_medias_recent_v1(random_tag, amount=20) 13 | if not medias: 14 | logging.warning(f"No media items found for tag: {random_tag}") 15 | return 16 | 17 | media = random.choice(medias) 18 | client.media_like(media.pk) 19 | logging.info(f"Liked random media: {media.pk} from tag: {random_tag}") 20 | 21 | sleep_time = random.uniform(5, 15) 22 | logging.info(f"Sleeping for {sleep_time:.2f} seconds to mimic human behavior.") 23 | sleep(sleep_time) 24 | except Exception as e: 25 | logging.error(f"Failed to perform human-like actions: {e}") 26 | 27 | def scrape_reels(client, profile, num_reels, last_scrape_time, uploaded_reels, scraped_reels): 28 | user_id = client.user_id_from_username(profile) 29 | reels = [] 30 | all_downloaded_reels = [] 31 | 32 | for reel in client.user_clips(user_id, amount=num_reels): 33 | if reel.pk in uploaded_reels or reel.pk in scraped_reels: 34 | continue 35 | 36 | try: 37 | media_path = client.clip_download(reel.pk, folder='downloads') 38 | if media_path: 39 | description_path = os.path.join('downloads', f'{reel.pk}.txt') 40 | with open(description_path, 'w', encoding='utf-8') as f: 41 | f.write(reel.caption_text or '') 42 | 43 | reels.append(reel) 44 | all_downloaded_reels.append(f"{profile}_{reel.pk}") 45 | 46 | if random.random() < 0.5: 47 | perform_human_actions(client, profile) 48 | logging.info(f"Scraped and saved reel: {reel.pk}") 49 | 50 | # Update status after each successful scrape 51 | update_status( 52 | last_scrape_time=datetime.now().timestamp(), 53 | next_scrape_time=(datetime.now() + timedelta(minutes=60)).timestamp(), 54 | reels_scraped=all_downloaded_reels 55 | ) 56 | 57 | sleep_time = random_sleep(10, 60, action="next reel scrape", profile_reel_id=f"{profile}_{reel.pk}") 58 | logging.info(f"Sleeping for {sleep_time:.2f} seconds before next reel scrape.") 59 | sleep_with_progress_bar(sleep_time) 60 | except Exception as e: 61 | logging.error(f"Failed to scrape or save reel {reel.pk}: {e}") 62 | 63 | if not reels: 64 | logging.info("No new reels scraped.") 65 | 66 | update_status( 67 | last_scrape_time=datetime.now().timestamp(), 68 | next_scrape_time=(datetime.now() + timedelta(minutes=60)).timestamp(), 69 | reels_scraped=all_downloaded_reels 70 | ) 71 | 72 | return reels 73 | -------------------------------------------------------------------------------- /auth.py: -------------------------------------------------------------------------------- 1 | import json 2 | import logging 3 | import os 4 | from instagrapi import Client 5 | from cryptography.fernet import Fernet 6 | from rich.console import Console 7 | 8 | console = Console() 9 | 10 | def generate_key(): 11 | """Generate a new encryption key.""" 12 | return Fernet.generate_key() 13 | 14 | def encrypt_credentials(username, password, key): 15 | """Encrypt the username and password using the provided key.""" 16 | cipher_suite = Fernet(key) 17 | encrypted_username = cipher_suite.encrypt(username).decode() 18 | encrypted_password = cipher_suite.encrypt(password).decode() 19 | return encrypted_username, encrypted_password 20 | 21 | def decrypt_credentials(config): 22 | """Decrypt Instagram credentials from the config.""" 23 | key = config['key'].encode() 24 | cipher_suite = Fernet(key) 25 | decrypted_username = cipher_suite.decrypt(config['instagram']['username'].encode()).decode() 26 | decrypted_password = cipher_suite.decrypt(config['instagram']['password'].encode()).decode() 27 | return decrypted_username, decrypted_password 28 | 29 | def perform_login(client, username, password, session_file): 30 | """Login to Instagram using instagrapi Client.""" 31 | if os.path.exists(session_file): 32 | try: 33 | client.load_settings(session_file) 34 | client.login(username, password) 35 | console.print("[bold green]Logged in using existing session file[/bold green]") 36 | return True 37 | except Exception as e: 38 | console.print(f"[bold red]Failed to log in using session file: {e}[/bold red]") 39 | os.remove(session_file) 40 | return perform_login(client, username, password, session_file) 41 | else: 42 | try: 43 | client.login(username, password) 44 | client.dump_settings(session_file) 45 | console.print("[bold green]Successfully logged in and session saved[/bold green]") 46 | return True 47 | except Exception as e: 48 | console.print(f"[bold red]Login failed: {e}[/bold red]") 49 | return False 50 | 51 | def update_session_file(client, session_file): 52 | """Update the session file with the latest session details.""" 53 | try: 54 | client.dump_settings(session_file) 55 | logging.info(f"Session file updated: {session_file}") 56 | except Exception as e: 57 | logging.error(f"Failed to update session file: {e}") 58 | 59 | def inject_cookies(client, session_file): 60 | """Inject cookies from session to client.""" 61 | try: 62 | with open(session_file, 'r') as f: 63 | settings = json.load(f) 64 | client.set_settings(settings) 65 | logging.info("Cookies injected successfully") 66 | except Exception as e: 67 | logging.error(f"Failed to inject cookies: {e}") 68 | 69 | def relogin(client, username, password, session_file): 70 | """Re-login to Instagram, handling rate limits or session issues.""" 71 | try: 72 | client.relogin() 73 | update_session_file(client, session_file) 74 | console.print(f"[bold green]Re-logged in successfully[/bold green]") 75 | except Exception as e: 76 | logging.error(f"Re-login failed: {e}") 77 | console.print(f"[bold red]Re-login failed: {e}. Attempting fresh login...[/bold red]") 78 | perform_login(client, username, password, session_file) 79 | -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/auth.py: -------------------------------------------------------------------------------- 1 | import json 2 | import logging 3 | import os 4 | from instagrapi import Client 5 | from cryptography.fernet import Fernet 6 | from rich.console import Console 7 | 8 | console = Console() 9 | 10 | def generate_key(): 11 | """Generate a new encryption key.""" 12 | return Fernet.generate_key() 13 | 14 | def encrypt_credentials(username, password, key): 15 | """Encrypt the username and password using the provided key.""" 16 | cipher_suite = Fernet(key) 17 | encrypted_username = cipher_suite.encrypt(username).decode() 18 | encrypted_password = cipher_suite.encrypt(password).decode() 19 | return encrypted_username, encrypted_password 20 | 21 | def decrypt_credentials(config): 22 | """Decrypt Instagram credentials from the config.""" 23 | key = config['key'].encode() 24 | cipher_suite = Fernet(key) 25 | decrypted_username = cipher_suite.decrypt(config['instagram']['username'].encode()).decode() 26 | decrypted_password = cipher_suite.decrypt(config['instagram']['password'].encode()).decode() 27 | return decrypted_username, decrypted_password 28 | 29 | def perform_login(client, username, password, session_file): 30 | """Login to Instagram using instagrapi Client.""" 31 | if os.path.exists(session_file): 32 | try: 33 | client.load_settings(session_file) 34 | client.login(username, password) 35 | console.print("[bold green]Logged in using existing session file[/bold green]") 36 | return True 37 | except Exception as e: 38 | console.print(f"[bold red]Failed to log in using session file: {e}[/bold red]") 39 | os.remove(session_file) 40 | return perform_login(client, username, password, session_file) 41 | else: 42 | try: 43 | client.login(username, password) 44 | client.dump_settings(session_file) 45 | console.print("[bold green]Successfully logged in and session saved[/bold green]") 46 | return True 47 | except Exception as e: 48 | console.print(f"[bold red]Login failed: {e}[/bold red]") 49 | return False 50 | 51 | def update_session_file(client, session_file): 52 | """Update the session file with the latest session details.""" 53 | try: 54 | client.dump_settings(session_file) 55 | logging.info(f"Session file updated: {session_file}") 56 | except Exception as e: 57 | logging.error(f"Failed to update session file: {e}") 58 | 59 | def inject_cookies(client, session_file): 60 | """Inject cookies from session to client.""" 61 | try: 62 | with open(session_file, 'r') as f: 63 | settings = json.load(f) 64 | client.set_settings(settings) 65 | logging.info("Cookies injected successfully") 66 | except Exception as e: 67 | logging.error(f"Failed to inject cookies: {e}") 68 | 69 | def relogin(client, username, password, session_file): 70 | """Re-login to Instagram, handling rate limits or session issues.""" 71 | try: 72 | client.relogin() 73 | update_session_file(client, session_file) 74 | console.print(f"[bold green]Re-logged in successfully[/bold green]") 75 | except Exception as e: 76 | logging.error(f"Re-login failed: {e}") 77 | console.print(f"[bold red]Re-login failed: {e}. Attempting fresh login...[/bold red]") 78 | perform_login(client, username, password, session_file) 79 | -------------------------------------------------------------------------------- /Historic/Version 3.2.0 - 92224/auth.py: -------------------------------------------------------------------------------- 1 | import json 2 | import logging 3 | import os 4 | from instagrapi import Client 5 | from cryptography.fernet import Fernet 6 | from rich.console import Console 7 | 8 | console = Console() 9 | 10 | def generate_key(): 11 | """Generate a new encryption key.""" 12 | return Fernet.generate_key() 13 | 14 | def encrypt_credentials(username, password, key): 15 | """Encrypt the username and password using the provided key.""" 16 | cipher_suite = Fernet(key) 17 | encrypted_username = cipher_suite.encrypt(username).decode() 18 | encrypted_password = cipher_suite.encrypt(password).decode() 19 | return encrypted_username, encrypted_password 20 | 21 | def decrypt_credentials(config): 22 | """Decrypt Instagram credentials from the config.""" 23 | key = config['key'].encode() 24 | cipher_suite = Fernet(key) 25 | decrypted_username = cipher_suite.decrypt(config['instagram']['username'].encode()).decode() 26 | decrypted_password = cipher_suite.decrypt(config['instagram']['password'].encode()).decode() 27 | return decrypted_username, decrypted_password 28 | 29 | def perform_login(client, username, password, session_file): 30 | """Login to Instagram using instagrapi Client.""" 31 | if os.path.exists(session_file): 32 | try: 33 | client.load_settings(session_file) 34 | client.login(username, password) 35 | console.print("[bold green]Logged in using existing session file[/bold green]") 36 | return True 37 | except Exception as e: 38 | console.print(f"[bold red]Failed to log in using session file: {e}[/bold red]") 39 | os.remove(session_file) 40 | return perform_login(client, username, password, session_file) 41 | else: 42 | try: 43 | client.login(username, password) 44 | client.dump_settings(session_file) 45 | console.print("[bold green]Successfully logged in and session saved[/bold green]") 46 | return True 47 | except Exception as e: 48 | console.print(f"[bold red]Login failed: {e}[/bold red]") 49 | return False 50 | 51 | def update_session_file(client, session_file): 52 | """Update the session file with the latest session details.""" 53 | try: 54 | client.dump_settings(session_file) 55 | logging.info(f"Session file updated: {session_file}") 56 | except Exception as e: 57 | logging.error(f"Failed to update session file: {e}") 58 | 59 | def inject_cookies(client, session_file): 60 | """Inject cookies from session to client.""" 61 | try: 62 | with open(session_file, 'r') as f: 63 | settings = json.load(f) 64 | client.set_settings(settings) 65 | logging.info("Cookies injected successfully") 66 | except Exception as e: 67 | logging.error(f"Failed to inject cookies: {e}") 68 | 69 | def relogin(client, username, password, session_file): 70 | """Re-login to Instagram, handling rate limits or session issues.""" 71 | try: 72 | client.relogin() 73 | update_session_file(client, session_file) 74 | console.print(f"[bold green]Re-logged in successfully[/bold green]") 75 | except Exception as e: 76 | logging.error(f"Re-login failed: {e}") 77 | console.print(f"[bold red]Re-login failed: {e}. Attempting fresh login...[/bold red]") 78 | perform_login(client, username, password, session_file) 79 | -------------------------------------------------------------------------------- /Historic/Version 2.2 - 7282024/auth.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import logging 4 | from instagrapi import Client 5 | from cryptography.fernet import Fernet 6 | from rich.console import Console 7 | 8 | console = Console() 9 | 10 | def generate_key(): 11 | return Fernet.generate_key() 12 | 13 | def encrypt_credentials(username, password, key): 14 | cipher_suite = Fernet(key) 15 | encrypted_username = cipher_suite.encrypt(username.encode()).decode() 16 | encrypted_password = cipher_suite.encrypt(password.encode()).decode() 17 | return encrypted_username, encrypted_password 18 | 19 | def decrypt_credentials(config): 20 | key = config['key'].encode() 21 | cipher_suite = Fernet(key) 22 | decrypted_username = cipher_suite.decrypt(config['instagram']['username'].encode()).decode() 23 | decrypted_password = cipher_suite.decrypt(config['instagram']['password'].encode()).decode() 24 | return decrypted_username, decrypted_password 25 | 26 | def save_session(client, filename='session.json'): 27 | settings = client.get_settings() 28 | with open(filename, 'w') as f: 29 | json.dump(settings, f) 30 | console.print(f"[bold blue]Session file created/updated: {filename}[/bold blue]") 31 | 32 | def load_session(client, filename='session.json'): 33 | if os.path.exists(filename): 34 | with open(filename, 'r') as f: 35 | settings = json.load(f) 36 | client.set_settings(settings) 37 | return True 38 | return False 39 | 40 | def login(client, username, password, session_file='session.json'): 41 | if load_session(client, session_file): 42 | try: 43 | client.get_timeline_feed() 44 | console.print("[bold blue]Logged in using session file[/bold blue]") 45 | return 46 | except Exception as e: 47 | console.print(f"[bold red]Failed to login using session file: {e}[/bold red]") 48 | 49 | try: 50 | client.login(username, password) 51 | client.set_timezone_offset(-21600) # Set CST (Chicago) timezone offset 52 | save_session(client, session_file) 53 | console.print(f"[bold blue]Logged in using username and password, session file created - {username}[/bold blue]") 54 | except Exception as e: 55 | console.print(f"[bold red]Failed to login using username and password: {e}[/bold red]") 56 | 57 | def update_session_file(client, session_file='session.json'): 58 | if os.path.exists(session_file): 59 | with open(session_file, 'r') as f: 60 | session_data = json.load(f) 61 | session_data['authorization_data'] = { 62 | 'ds_user_id': client.user_id, 63 | 'sessionid': client.sessionid 64 | } 65 | session_data['cookies'] = client.cookie_dict 66 | with open(session_file, 'w') as f: 67 | json.dump(session_data, f, indent=4) 68 | console.print("[bold blue]Session file updated with user ds_user_id and cookies.[/bold blue]") 69 | 70 | def relogin(client, username, password, session_file='session.json'): 71 | console.print("[bold blue]Attempting to re-login to Instagram...[/bold blue]") 72 | client.relogin() 73 | client.set_timezone_offset(-21600) # Ensure timezone offset is set during re-login 74 | update_session_file(client, session_file) 75 | console.print("[bold blue]Re-login successful and session file updated.[/bold blue]") 76 | 77 | if __name__ == "__main__": 78 | config = { 79 | 'key': 'your_generated_key_here', 80 | 'instagram': { 81 | 'username': 'your_encrypted_username_here', 82 | 'password': 'your_encrypted_password_here' 83 | } 84 | } 85 | username, password = decrypt_credentials(config) 86 | client = Client() 87 | login(client, username, password) 88 | update_session_file(client) 89 | -------------------------------------------------------------------------------- /Historic/Version 3.0 - 852024/default_comments.py: -------------------------------------------------------------------------------- 1 | # default_comments.py 2 | 3 | DEFAULT_COMMENTS = [ 4 | """Loving this! 🔥""", 5 | """This made my day! 😄""", 6 | """Couldn't agree more! 👏""", 7 | """Wow, just wow! 😍""", 8 | """This is amazing! 😎""", 9 | """Pure gold! 💯""", 10 | """Such a mood! 😂""", 11 | """So true! 🙌""", 12 | """Nailed it! 💥""", 13 | """This is everything! ❤️""", 14 | """Incredible work! 👌""", 15 | """Too good! 😆""", 16 | """Absolutely love this! 😍""", 17 | """Mind-blowing! 🤯""", 18 | """This is awesome! 🤩""", 19 | """So well said! 💬""", 20 | """Totally relatable! 🙈""", 21 | """Such great content! 👍""", 22 | """This just made my day! 🌟""", 23 | """On point! 🎯""", 24 | """Well done! 👏""", 25 | """This is next level! 🚀""", 26 | """Keep up the great work! 💪""", 27 | """So inspirational! 🌟""", 28 | """Just perfect! ✨""", 29 | """Just stumbled upon this and had to share! 🤩""", 30 | """This totally made my day. Thanks for sharing! 😄""", 31 | """Can’t stop laughing at this! 😂😂""", 32 | """Exactly what I needed to see today. 🙌""", 33 | """This is pure genius! 👏""", 34 | """I can’t believe how much I relate to this. 😅""", 35 | """This hit me right in the feels. ❤️""", 36 | """Literally couldn’t agree more with this! 💯""", 37 | """This is everything I didn’t know I needed today. 😍""", 38 | """Such a vibe! Love this so much. ✨""", 39 | """This is the kind of content I’m here for! 🙌""", 40 | """Wow, this just blew my mind. 🤯""", 41 | """Yup, this is me all the way! 😆""", 42 | """This is gold! Thanks for posting it. 🙏""", 43 | """I’m obsessed with this. Need more of it in my life! 😍""", 44 | """Just when I thought today couldn’t get better... this pops up! 😁""", 45 | """The accuracy here is unreal! 😂""", 46 | """How is this so perfect? Seriously! 👌""", 47 | """This is definitely going on my mood board. 🎯""", 48 | """You just won the internet with this one! 🏆""", 49 | """This made me smile so much. 😊""", 50 | """I needed a good laugh today, and this delivered! 😂""", 51 | """This is too good not to share. 😍""", 52 | """Can we just take a moment to appreciate how awesome this is? 🙌""", 53 | """So glad I saw this today. Made my whole day better! 🌟""", 54 | """Trying not to violate community guidelines with how hard I’m laughing at this! 😂""", 55 | """This is so good, it should come with a community guidelines warning! 😜""", 56 | """If laughing at this breaks the community guidelines, then I’m guilty as charged! 😆""", 57 | """I promise this comment doesn’t violate any community guidelines... probably. 🤞""", 58 | """This might be dangerously funny, but I swear it’s still community guidelines friendly! 😂""", 59 | """If loving this is wrong, then the community guidelines need to be rewritten! 😂""", 60 | """Don’t worry, this laugh is 100% community guidelines approved! 😂""", 61 | """Too funny, but definitely not crossing any community guidelines lines! 😎""", 62 | """Can’t believe this isn’t flagged for being too hilarious! 😂 #SafeForWork""", 63 | """This is everything! Double tap if you agree! ❤️""", 64 | """If you’re not loving this, you’re doing Instagram wrong. 👍""", 65 | """Stop scrolling and hit that like button if this made you smile! 😊💯""", 66 | """Just dropped a like because this post deserves it! 💥""", 67 | """This is what peak content looks like. Like if you agree! 💯🔥""", 68 | """Can we just appreciate how awesome this is? Double tap! 🙌❤️""", 69 | """This is too good not to like! 😍💯""", 70 | """If this doesn’t get all the likes, I don’t know what will! ❤️💥""", 71 | """I’m just here to give this post the like it deserves! 👍🔥""", 72 | """Like this if it made your day just a little bit better! 😊❤️""", 73 | ] 74 | -------------------------------------------------------------------------------- /Historic/Version 3.1 81424/default_comments.py: -------------------------------------------------------------------------------- 1 | # default_comments.py 2 | 3 | DEFAULT_COMMENTS = [ 4 | """Loving this! 🔥""", 5 | """This made my day! 😄""", 6 | """Couldn't agree more! 👏""", 7 | """Wow, just wow! 😍""", 8 | """This is amazing! 😎""", 9 | """Pure gold! 💯""", 10 | """Such a mood! 😂""", 11 | """So true! 🙌""", 12 | """Nailed it! 💥""", 13 | """This is everything! ❤️""", 14 | """Incredible work! 👌""", 15 | """Too good! 😆""", 16 | """Absolutely love this! 😍""", 17 | """Mind-blowing! 🤯""", 18 | """This is awesome! 🤩""", 19 | """So well said! 💬""", 20 | """Totally relatable! 🙈""", 21 | """Such great content! 👍""", 22 | """This just made my day! 🌟""", 23 | """On point! 🎯""", 24 | """Well done! 👏""", 25 | """This is next level! 🚀""", 26 | """Keep up the great work! 💪""", 27 | """So inspirational! 🌟""", 28 | """Just perfect! ✨""", 29 | """Just stumbled upon this and had to share! 🤩""", 30 | """This totally made my day. Thanks for sharing! 😄""", 31 | """Can’t stop laughing at this! 😂😂""", 32 | """Exactly what I needed to see today. 🙌""", 33 | """This is pure genius! 👏""", 34 | """I can’t believe how much I relate to this. 😅""", 35 | """This hit me right in the feels. ❤️""", 36 | """Literally couldn’t agree more with this! 💯""", 37 | """This is everything I didn’t know I needed today. 😍""", 38 | """Such a vibe! Love this so much. ✨""", 39 | """This is the kind of content I’m here for! 🙌""", 40 | """Wow, this just blew my mind. 🤯""", 41 | """Yup, this is me all the way! 😆""", 42 | """This is gold! Thanks for posting it. 🙏""", 43 | """I’m obsessed with this. Need more of it in my life! 😍""", 44 | """Just when I thought today couldn’t get better... this pops up! 😁""", 45 | """The accuracy here is unreal! 😂""", 46 | """How is this so perfect? Seriously! 👌""", 47 | """This is definitely going on my mood board. 🎯""", 48 | """You just won the internet with this one! 🏆""", 49 | """This made me smile so much. 😊""", 50 | """I needed a good laugh today, and this delivered! 😂""", 51 | """This is too good not to share. 😍""", 52 | """Can we just take a moment to appreciate how awesome this is? 🙌""", 53 | """So glad I saw this today. Made my whole day better! 🌟""", 54 | """Trying not to violate community guidelines with how hard I’m laughing at this! 😂""", 55 | """This is so good, it should come with a community guidelines warning! 😜""", 56 | """If laughing at this breaks the community guidelines, then I’m guilty as charged! 😆""", 57 | """I promise this comment doesn’t violate any community guidelines... probably. 🤞""", 58 | """This might be dangerously funny, but I swear it’s still community guidelines friendly! 😂""", 59 | """If loving this is wrong, then the community guidelines need to be rewritten! 😂""", 60 | """Don’t worry, this laugh is 100% community guidelines approved! 😂""", 61 | """Too funny, but definitely not crossing any community guidelines lines! 😎""", 62 | """Can’t believe this isn’t flagged for being too hilarious! 😂 #SafeForWork""", 63 | """This is everything! Double tap if you agree! ❤️""", 64 | """If you’re not loving this, you’re doing Instagram wrong. 👍""", 65 | """Stop scrolling and hit that like button if this made you smile! 😊💯""", 66 | """Just dropped a like because this post deserves it! 💥""", 67 | """This is what peak content looks like. Like if you agree! 💯🔥""", 68 | """Can we just appreciate how awesome this is? Double tap! 🙌❤️""", 69 | """This is too good not to like! 😍💯""", 70 | """If this doesn’t get all the likes, I don’t know what will! ❤️💥""", 71 | """I’m just here to give this post the like it deserves! 👍🔥""", 72 | """Like this if it made your day just a little bit better! 😊❤️""", 73 | ] 74 | -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/default_comments.py: -------------------------------------------------------------------------------- 1 | # default_comments.py 2 | 3 | DEFAULT_COMMENTS = [ 4 | """Loving this! 🔥""", 5 | """This made my day! 😄""", 6 | """Couldn't agree more! 👏""", 7 | """Wow, just wow! 😍""", 8 | """This is amazing! 😎""", 9 | """Pure gold! 💯""", 10 | """Such a mood! 😂""", 11 | """So true! 🙌""", 12 | """Nailed it! 💥""", 13 | """This is everything! ❤️""", 14 | """Incredible work! 👌""", 15 | """Too good! 😆""", 16 | """Absolutely love this! 😍""", 17 | """Mind-blowing! 🤯""", 18 | """This is awesome! 🤩""", 19 | """So well said! 💬""", 20 | """Totally relatable! 🙈""", 21 | """Such great content! 👍""", 22 | """This just made my day! 🌟""", 23 | """On point! 🎯""", 24 | """Well done! 👏""", 25 | """This is next level! 🚀""", 26 | """Keep up the great work! 💪""", 27 | """So inspirational! 🌟""", 28 | """Just perfect! ✨""", 29 | """Just stumbled upon this and had to share! 🤩""", 30 | """This totally made my day. Thanks for sharing! 😄""", 31 | """Can’t stop laughing at this! 😂😂""", 32 | """Exactly what I needed to see today. 🙌""", 33 | """This is pure genius! 👏""", 34 | """I can’t believe how much I relate to this. 😅""", 35 | """This hit me right in the feels. ❤️""", 36 | """Literally couldn’t agree more with this! 💯""", 37 | """This is everything I didn’t know I needed today. 😍""", 38 | """Such a vibe! Love this so much. ✨""", 39 | """This is the kind of content I’m here for! 🙌""", 40 | """Wow, this just blew my mind. 🤯""", 41 | """Yup, this is me all the way! 😆""", 42 | """This is gold! Thanks for posting it. 🙏""", 43 | """I’m obsessed with this. Need more of it in my life! 😍""", 44 | """Just when I thought today couldn’t get better... this pops up! 😁""", 45 | """The accuracy here is unreal! 😂""", 46 | """How is this so perfect? Seriously! 👌""", 47 | """This is definitely going on my mood board. 🎯""", 48 | """You just won the internet with this one! 🏆""", 49 | """This made me smile so much. 😊""", 50 | """I needed a good laugh today, and this delivered! 😂""", 51 | """This is too good not to share. 😍""", 52 | """Can we just take a moment to appreciate how awesome this is? 🙌""", 53 | """So glad I saw this today. Made my whole day better! 🌟""", 54 | """Trying not to violate community guidelines with how hard I’m laughing at this! 😂""", 55 | """This is so good, it should come with a community guidelines warning! 😜""", 56 | """If laughing at this breaks the community guidelines, then I’m guilty as charged! 😆""", 57 | """I promise this comment doesn’t violate any community guidelines... probably. 🤞""", 58 | """This might be dangerously funny, but I swear it’s still community guidelines friendly! 😂""", 59 | """If loving this is wrong, then the community guidelines need to be rewritten! 😂""", 60 | """Don’t worry, this laugh is 100% community guidelines approved! 😂""", 61 | """Too funny, but definitely not crossing any community guidelines lines! 😎""", 62 | """Can’t believe this isn’t flagged for being too hilarious! 😂 #SafeForWork""", 63 | """This is everything! Double tap if you agree! ❤️""", 64 | """If you’re not loving this, you’re doing Instagram wrong. 👍""", 65 | """Stop scrolling and hit that like button if this made you smile! 😊💯""", 66 | """Just dropped a like because this post deserves it! 💥""", 67 | """This is what peak content looks like. Like if you agree! 💯🔥""", 68 | """Can we just appreciate how awesome this is? Double tap! 🙌❤️""", 69 | """This is too good not to like! 😍💯""", 70 | """If this doesn’t get all the likes, I don’t know what will! ❤️💥""", 71 | """I’m just here to give this post the like it deserves! 👍🔥""", 72 | """Like this if it made your day just a little bit better! 😊❤️""", 73 | ] 74 | -------------------------------------------------------------------------------- /2FA_DEV/DEV_auth.py: -------------------------------------------------------------------------------- 1 | import json 2 | import logging 3 | import os 4 | from instagrapi import Client 5 | from cryptography.fernet import Fernet 6 | from rich.console import Console 7 | 8 | console = Console() 9 | 10 | def generate_key(): 11 | """Generate a new encryption key.""" 12 | return Fernet.generate_key() 13 | 14 | def encrypt_credentials(username, password, key): 15 | """Encrypt the username and password using the provided key.""" 16 | cipher_suite = Fernet(key) 17 | encrypted_username = cipher_suite.encrypt(username).decode() 18 | encrypted_password = cipher_suite.encrypt(password).decode() 19 | return encrypted_username, encrypted_password 20 | 21 | def decrypt_credentials(config): 22 | """Decrypt Instagram credentials from the config.""" 23 | key = config['key'].encode() 24 | cipher_suite = Fernet(key) 25 | decrypted_username = cipher_suite.decrypt(config['instagram']['username'].encode()).decode() 26 | decrypted_password = cipher_suite.decrypt(config['instagram']['password'].encode()).decode() 27 | return decrypted_username, decrypted_password 28 | 29 | def perform_login(client, username, password, session_file): 30 | """Login to Instagram using instagrapi Client.""" 31 | if os.path.exists(session_file): 32 | try: 33 | client.load_settings(session_file) 34 | client.login(username, password) 35 | console.print("[bold green]Logged in using existing session file[/bold green]") 36 | return True 37 | except Exception as e: 38 | console.print(f"[bold red]Failed to log in using session file: {e}[/bold red]") 39 | os.remove(session_file) 40 | return perform_login(client, username, password, session_file) 41 | else: 42 | try: 43 | client.login(username, password) 44 | client.dump_settings(session_file) 45 | console.print("[bold green]Successfully logged in and session saved[/bold green]") 46 | return True 47 | except Exception as e: 48 | if 'two_factor_required' in str(e): 49 | console.print("[bold yellow]Two-factor authentication required! Please enter the code sent to your device.[/bold yellow]") 50 | code = input("Enter 2FA code: ") 51 | client.two_factor_login(code) 52 | client.dump_settings(session_file) 53 | console.print("[bold green]Logged in successfully with 2FA![/bold green]") 54 | return True 55 | console.print(f"[bold red]Login failed: {e}[/bold red]") 56 | return False 57 | 58 | def update_session_file(client, session_file): 59 | """Update the session file with the latest session details.""" 60 | try: 61 | client.dump_settings(session_file) 62 | logging.info(f"Session file updated: {session_file}") 63 | except Exception as e: 64 | logging.error(f"Failed to update session file: {e}") 65 | 66 | def inject_cookies(client, session_file): 67 | """Inject cookies from session to client.""" 68 | try: 69 | with open(session_file, 'r') as f: 70 | settings = json.load(f) 71 | client.set_settings(settings) 72 | logging.info("Cookies injected successfully") 73 | except Exception as e: 74 | logging.error(f"Failed to inject cookies: {e}") 75 | 76 | def relogin(client, username, password, session_file): 77 | """Re-login to Instagram, handling rate limits or session issues.""" 78 | try: 79 | client.relogin() 80 | update_session_file(client, session_file) 81 | console.print(f"[bold green]Re-logged in successfully[/bold green]") 82 | except Exception as e: 83 | logging.error(f"Re-login failed: {e}") 84 | console.print(f"[bold red]Re-login failed: {e}. Attempting fresh login...[/bold red]") 85 | perform_login(client, username, password, session_file) 86 | -------------------------------------------------------------------------------- /Historic/Version 2.2 - 7282024/scrape.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import random 3 | import os 4 | from time import sleep 5 | from datetime import datetime 6 | from tqdm import tqdm 7 | from rich.console import Console 8 | from utils import update_status, read_status, random_sleep, sleep_with_progress_bar 9 | 10 | console = Console() 11 | 12 | def perform_human_actions(client, tags): 13 | if not tags: 14 | console.print(f"[bold bright_red]No tags provided for human-like actions.[/bold bright_red]") 15 | return 16 | 17 | random_tag = random.choice(tags) 18 | console.print(f"[bold yellow]Performing human-like actions on tag: {random_tag}[/bold yellow]") 19 | 20 | actions = [ 21 | lambda tag: client.hashtag_medias_recent_v1(tag, amount=10), 22 | lambda tag: client.hashtag_medias_top_v1(tag, amount=9), 23 | lambda tag: client.hashtag_medias_top(tag, amount=9) 24 | ] 25 | 26 | try: 27 | action = random.choice(actions) 28 | medias = action(random_tag) 29 | 30 | if medias: 31 | console.print(f"[bold yellow]Media found using {action.__name__}.[/bold yellow]") 32 | media = random.choice(medias) 33 | media_id = media.pk 34 | client.media_like(media_id) 35 | console.print(f"[bold yellow]Liked random media: {media_id} from tag: {random_tag}.[/bold yellow]") 36 | 37 | sleep_time = random.uniform(5, 15) 38 | console.print(f"[bold yellow]Sleeping for {sleep_time:.2f} seconds to mimic human behavior.[/bold yellow]") 39 | sleep(sleep_time) 40 | else: 41 | console.print(f"[bold bright_red]No media found for tag: {random_tag}.[/bold bright_red]") 42 | except Exception as e: 43 | console.print(f"[bold red]Failed to perform human-like actions: {e}.[/bold red]") 44 | 45 | def scrape_reels(client, profile, num_reels, last_scrape_time, uploaded_reels, scraped_reels, tags): 46 | user_id = client.user_id_from_username(profile) 47 | reels = [] 48 | new_scraped_reels = [] 49 | 50 | for reel in client.user_clips(user_id, amount=num_reels): 51 | reel_id_str = str(reel.pk) # Ensure reel_id is treated as a string 52 | profile_reel_id = f"{profile}_{reel_id_str}" 53 | if profile_reel_id in uploaded_reels or profile_reel_id in scraped_reels: 54 | continue 55 | 56 | try: 57 | media_path = client.clip_download(reel.pk, folder='downloads') 58 | if media_path: 59 | description_path = os.path.join('downloads', f'{reel_id_str}.txt') 60 | with open(description_path, 'w', encoding='utf-8') as f: 61 | f.write(reel.caption_text or '') 62 | 63 | reels.append(reel) 64 | new_scraped_reels.append(profile_reel_id) 65 | 66 | if random.random() < 0.5: 67 | perform_human_actions(client, tags) 68 | console.print(f"[bold bright_green]Scraped and saved reel: {profile_reel_id}.[/bold bright_green]") 69 | 70 | sleep_time = random_sleep(10, 60, action="next reel scrape", profile_reel_id=profile_reel_id) 71 | console.print(f"[bold bright_green]Sleeping for {sleep_time:.2f} seconds before next reel scrape.[/bold bright_green]") 72 | sleep_with_progress_bar(sleep_time) 73 | 74 | # Update status after each reel is scraped 75 | status = read_status() 76 | status['reels_scraped'].append(profile_reel_id) 77 | update_status(last_scrape_time=datetime.now().timestamp(), reels_scraped=status['reels_scraped']) 78 | 79 | except Exception as e: 80 | console.print(f"[bold red]Failed to scrape or save reel {profile_reel_id}: {e}.[/bold red]") 81 | 82 | return new_scraped_reels 83 | -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/2FA_DEV/DEV_auth.py: -------------------------------------------------------------------------------- 1 | import json 2 | import logging 3 | import os 4 | from instagrapi import Client 5 | from cryptography.fernet import Fernet 6 | from rich.console import Console 7 | 8 | console = Console() 9 | 10 | def generate_key(): 11 | """Generate a new encryption key.""" 12 | return Fernet.generate_key() 13 | 14 | def encrypt_credentials(username, password, key): 15 | """Encrypt the username and password using the provided key.""" 16 | cipher_suite = Fernet(key) 17 | encrypted_username = cipher_suite.encrypt(username).decode() 18 | encrypted_password = cipher_suite.encrypt(password).decode() 19 | return encrypted_username, encrypted_password 20 | 21 | def decrypt_credentials(config): 22 | """Decrypt Instagram credentials from the config.""" 23 | key = config['key'].encode() 24 | cipher_suite = Fernet(key) 25 | decrypted_username = cipher_suite.decrypt(config['instagram']['username'].encode()).decode() 26 | decrypted_password = cipher_suite.decrypt(config['instagram']['password'].encode()).decode() 27 | return decrypted_username, decrypted_password 28 | 29 | def perform_login(client, username, password, session_file): 30 | """Login to Instagram using instagrapi Client.""" 31 | if os.path.exists(session_file): 32 | try: 33 | client.load_settings(session_file) 34 | client.login(username, password) 35 | console.print("[bold green]Logged in using existing session file[/bold green]") 36 | return True 37 | except Exception as e: 38 | console.print(f"[bold red]Failed to log in using session file: {e}[/bold red]") 39 | os.remove(session_file) 40 | return perform_login(client, username, password, session_file) 41 | else: 42 | try: 43 | client.login(username, password) 44 | client.dump_settings(session_file) 45 | console.print("[bold green]Successfully logged in and session saved[/bold green]") 46 | return True 47 | except Exception as e: 48 | if 'two_factor_required' in str(e): 49 | console.print("[bold yellow]Two-factor authentication required! Please enter the code sent to your device.[/bold yellow]") 50 | code = input("Enter 2FA code: ") 51 | client.two_factor_login(code) 52 | client.dump_settings(session_file) 53 | console.print("[bold green]Logged in successfully with 2FA![/bold green]") 54 | return True 55 | console.print(f"[bold red]Login failed: {e}[/bold red]") 56 | return False 57 | 58 | def update_session_file(client, session_file): 59 | """Update the session file with the latest session details.""" 60 | try: 61 | client.dump_settings(session_file) 62 | logging.info(f"Session file updated: {session_file}") 63 | except Exception as e: 64 | logging.error(f"Failed to update session file: {e}") 65 | 66 | def inject_cookies(client, session_file): 67 | """Inject cookies from session to client.""" 68 | try: 69 | with open(session_file, 'r') as f: 70 | settings = json.load(f) 71 | client.set_settings(settings) 72 | logging.info("Cookies injected successfully") 73 | except Exception as e: 74 | logging.error(f"Failed to inject cookies: {e}") 75 | 76 | def relogin(client, username, password, session_file): 77 | """Re-login to Instagram, handling rate limits or session issues.""" 78 | try: 79 | client.relogin() 80 | update_session_file(client, session_file) 81 | console.print(f"[bold green]Re-logged in successfully[/bold green]") 82 | except Exception as e: 83 | logging.error(f"Re-login failed: {e}") 84 | console.print(f"[bold red]Re-login failed: {e}. Attempting fresh login...[/bold red]") 85 | perform_login(client, username, password, session_file) 86 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/scrape.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import random 3 | import os 4 | from time import sleep 5 | from datetime import datetime, timedelta 6 | from tqdm import tqdm 7 | from rich.console import Console 8 | from utils import update_status, read_status, random_sleep, sleep_with_progress_bar 9 | 10 | console = Console() 11 | 12 | def perform_human_actions(client, tags): 13 | if not tags: 14 | console.print(f"[bold bright_red]No tags provided for human-like actions.[/bold bright_red]") 15 | return 16 | 17 | random_tag = random.choice(tags) 18 | console.print(f"[bold yellow]Performing human-like actions on tag: {random_tag}[/bold yellow]") 19 | 20 | try: 21 | # Using hashtag_medias_recent_v1 22 | medias_recent = client.hashtag_medias_recent_v1(random_tag, amount=10) 23 | if medias_recent: 24 | console.print(f"[bold yellow]Media found using hashtag_medias_recent_v1.[/bold yellow]") 25 | 26 | # Using hashtag_medias_top_v1 27 | medias_top_v1 = client.hashtag_medias_top_v1(random_tag, amount=9) 28 | if medias_top_v1: 29 | console.print(f"[bold yellow]Media found using hashtag_medias_top_v1.[/bold yellow]") 30 | 31 | # Using hashtag_medias_top 32 | medias_top = client.hashtag_medias_top(random_tag, amount=9) 33 | if medias_top: 34 | console.print(f"[bold yellow]Media found using hashtag_medias_top.[/bold yellow]") 35 | 36 | # Combine all media lists and ensure no duplicates 37 | medias = list({media.pk: media for media in (medias_recent + medias_top_v1 + medias_top)}.values()) 38 | 39 | if not medias: 40 | console.print(f"[bold bright_red]No media found for tag: {random_tag}[/bold bright_red]") 41 | return 42 | 43 | media = random.choice(medias) 44 | media_id = media.pk 45 | client.media_like(media_id) 46 | console.print(f"[bold yellow]Liked random media: {media_id} from tag: {random_tag}[/bold yellow]") 47 | 48 | sleep_time = random.uniform(5, 15) 49 | console.print(f"[bold yellow]Sleeping for {sleep_time:.2f} seconds to mimic human behavior.[/bold yellow]") 50 | sleep(sleep_time) 51 | except Exception as e: 52 | console.print(f"[bold red]Failed to perform human-like actions: {e}[/bold red]") 53 | 54 | def scrape_reels(client, profile, num_reels, last_scrape_time, uploaded_reels, scraped_reels, tags): 55 | user_id = client.user_id_from_username(profile) 56 | reels = [] 57 | new_scraped_reels = [] 58 | 59 | for reel in client.user_clips(user_id, amount=num_reels): 60 | if reel.pk in uploaded_reels or reel.pk in scraped_reels: 61 | continue 62 | 63 | try: 64 | media_path = client.clip_download(reel.pk, folder='downloads') 65 | if media_path: 66 | description_path = os.path.join('downloads', f'{reel.pk}.txt') 67 | with open(description_path, 'w', encoding='utf-8') as f: 68 | f.write(reel.caption_text or '') 69 | 70 | reels.append(reel) 71 | new_scraped_reels.append(reel.pk) 72 | 73 | if random.random() < 0.5: 74 | perform_human_actions(client, tags) 75 | console.print(f"[bold bright_green]Scraped and saved reel: {reel.pk}[/bold bright_green]") 76 | 77 | sleep_time = random_sleep(10, 60, action="next reel scrape", profile_reel_id=f"{profile}_{reel.pk}") 78 | console.print(f"[bold bright_green]Sleeping for {sleep_time:.2f} seconds before next reel scrape.[/bold bright_green]") 79 | sleep_with_progress_bar(sleep_time) 80 | 81 | # Update status after each reel is scraped 82 | status = read_status() 83 | status['reels_scraped'].append(reel.pk) 84 | update_status(last_scrape_time=datetime.now().timestamp(), reels_scraped=status['reels_scraped']) 85 | 86 | except Exception as e: 87 | console.print(f"[bold red]Failed to scrape or save reel {reel.pk}: {e}[/bold red]") 88 | 89 | return reels 90 | -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/utils.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import random 4 | import logging 5 | from datetime import datetime 6 | from time import sleep 7 | 8 | 9 | def random_sleep(min_time=5, max_time=30, action="", profile_reel_id=""): 10 | sleep_time = random.uniform(min_time, max_time) 11 | logging.info(f"Sleeping for {sleep_time:.2f} seconds before {action}.") 12 | log_random_waits(sleep_time, profile_reel_id) 13 | return sleep_time 14 | 15 | def log_random_waits(sleep_time, profile_reel_id): 16 | random_waits_file = 'random-waits.json' 17 | initialize_json_file(random_waits_file) 18 | with open(random_waits_file, 'r') as f: 19 | random_waits = json.load(f) 20 | random_waits.append({'time': sleep_time, 'profile_reel_id': profile_reel_id}) 21 | with open(random_waits_file, 'w') as f: 22 | json.dump(random_waits, f) 23 | 24 | def log_random_upload_times(sleep_time, profile_reel_id): 25 | random_upload_time_file = 'random-upload-times.json' 26 | initialize_json_file(random_upload_time_file) 27 | with open(random_upload_time_file, 'r') as f: 28 | random_times = json.load(f) 29 | random_times.append({'time': sleep_time, 'profile_reel_id': profile_reel_id}) 30 | with open(random_upload_time_file, 'w') as f: 31 | json.dump(random_times, f) 32 | 33 | def initialize_json_file(file_path): 34 | if not os.path.exists(file_path): 35 | with open(file_path, 'w') as f: 36 | json.dump([], f) 37 | 38 | def update_status(**kwargs): 39 | status_file = 'status.json' 40 | default_status = { 41 | "last_scrape_time": 0, 42 | "next_scrape_time": 0, 43 | "reels_scraped": [], 44 | "last_upload_time": 0, 45 | "next_upload_time": 0, 46 | "last_story_upload_time": 0, 47 | "next_story_upload_time": 0, 48 | "last_delete_time": 0, 49 | "random_upload_times": [], 50 | "random_waits": [], 51 | "next_file_to_upload": "N/A" 52 | } 53 | status = default_status.copy() 54 | if os.path.exists(status_file): 55 | with open(status_file, 'r') as f: 56 | status.update(json.load(f)) 57 | 58 | status.update(kwargs) 59 | 60 | with open(status_file, 'w') as f: 61 | json.dump(status, f, indent=4, default=str) 62 | 63 | def read_status(): 64 | status_file = 'status.json' 65 | default_status = { 66 | "last_scrape_time": 0, 67 | "next_scrape_time": 0, 68 | "reels_scraped": [], 69 | "last_upload_time": 0, 70 | "next_upload_time": 0, 71 | "last_story_upload_time": 0, 72 | "next_story_upload_time": 0, 73 | "last_delete_time": 0, 74 | "random_upload_times": [], 75 | "random_waits": [], 76 | "next_file_to_upload": "N/A" 77 | } 78 | if os.path.exists(status_file): 79 | with open(status_file, 'r') as f: 80 | status = json.load(f) 81 | for key in ["last_scrape_time", "next_scrape_time", "last_upload_time", "next_upload_time", "last_story_upload_time", "next_story_upload_time", "last_delete_time"]: 82 | if status[key] is None: 83 | status[key] = 0 84 | elif isinstance(status[key], str): 85 | status[key] = datetime.strptime(status[key], "%Y-%m-%d %H:%M:%S.%f").timestamp() 86 | return status 87 | return default_status 88 | 89 | def initialize_status_file(): 90 | status_file = 'status.json' 91 | default_status = { 92 | "last_scrape_time": 0, 93 | "next_scrape_time": 0, 94 | "reels_scraped": [], 95 | "last_upload_time": 0, 96 | "next_upload_time": 0, 97 | "last_story_upload_time": 0, 98 | "next_story_upload_time": 0, 99 | "last_delete_time": 0, 100 | "random_upload_times": [], 101 | "random_waits": [], 102 | "next_file_to_upload": "N/A" 103 | } 104 | if not os.path.exists(status_file): 105 | with open(status_file, 'w') as f: 106 | json.dump(default_status, f, indent=4, default=str) 107 | 108 | def sleep_with_progress_bar(duration): 109 | from tqdm import tqdm 110 | for _ in tqdm(range(int(duration)), desc="Sleeping", unit="s"): 111 | sleep(1) 112 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/README.md: -------------------------------------------------------------------------------- 1 | 2 | # InstagramTheftyScraperPosterHumanV2.1 3 | 4 | ## See Changes Here: [Enhanced Breakdown of Changes in InstagramTheftyScraperPosterHuman V2.1](https://github.com/sujay1599/InstagramTheftyScraperPosterHuman/wiki/Changes-V2-to-V2.1) 5 | 6 | InstagramTheftyScraperPosterHuman is an advanced tool for automating the process of scraping, uploading, and managing Instagram reels. This tool builds upon previous versions, introducing several enhancements and new functionalities to improve automation, human-like interactions, and bot detection prevention. 7 | 8 | ## Features 9 | 10 | ### Core Features 11 | 12 | - **Scraping Reels**: Scrapes reels from specified Instagram profiles. 13 | - **Uploading Reels**: Uploads scraped reels with customizable descriptions and hashtags. 14 | - **Human-like Actions**: Performs random actions like liking, commenting, and following to mimic human behavior. 15 | - **Dashboard**: Displays detailed information about activities. 16 | - **Anti-Bot Detection**: Implements random waits and actions to avoid detection. 17 | - **Logging**: Logs all activities for better traceability and debugging. 18 | - **Configurable Settings**: Uses a YAML configuration file for easy customization. 19 | 20 | ### New Features in InstagramTheftyScraperPosterHuman 21 | 22 | - **Enhanced Random Waits**: Improved random wait handling to better simulate human behavior. 23 | - **Logging of Random Waits**: Separate logging of random wait times for better tracking. 24 | - **Detailed Logging of Comments**: Logs actual comments posted for better traceability. 25 | - **Improved Error Handling**: Captures more exceptions for robust error handling. 26 | - **Improved Dashboard**: Displays detailed scraping, uploading, and random wait information. 27 | - **Human-like Interactions**: More realistic human-like actions during waiting periods. 28 | - **Auto Restart Scraping**: Automatically restarts scraping when no videos are left to upload. 29 | 30 | ## Requirements 31 | 32 | - Python 3.6+ 33 | - Required Python packages (specified in `requirements.txt`) 34 | 35 | ### Install Required Packages 36 | 37 | ```bash 38 | pip install -r requirements.txt 39 | ``` 40 | 41 | ## Installation 42 | 43 | 1. Clone the repository: 44 | ```bash 45 | git clone https://github.com/sujay1599/InstagramTheftyScraperPosterHuman.git 46 | cd InstagramTheftyScraperPosterHuman 47 | ``` 48 | 2. Install the required packages: 49 | ```bash 50 | pip install -r requirements.txt 51 | ``` 52 | 3. Run `config_setup.py` to create the `config.yaml` file: 53 | ```bash 54 | python config_setup.py 55 | ``` 56 | 57 | ### Configuration 58 | 59 | The `config.yaml` file will be generated by running `config_setup.py` and includes settings for Instagram credentials, scraping, uploading, descriptions, hashtags, credits, deleting, comments, and custom tags. 60 | 61 | ## Usage 62 | 63 | Run the script: 64 | 65 | ```bash 66 | python main.py 67 | ``` 68 | 69 | ### Detailed Breakdown of Files 70 | 71 | - **auth.py**: Handles Instagram authentication and session management. 72 | - **config_setup.py**: Generates the `config.yaml` configuration file with encrypted credentials. 73 | - **dashboard.py**: Displays a detailed dashboard of activities. 74 | - **input_helpers.py**: Contains helper functions for getting user inputs during configuration setup. 75 | - **main.py**: Orchestrates scraping, uploading, and human-like actions processes. 76 | - **scrape.py**: Handles scraping of Instagram reels and performing human-like actions. 77 | - **upload.py**: Handles the uploading of scraped reels with customizable descriptions, hashtags, and credits. 78 | - **utils.py**: Contains utility functions for logging, status management, random sleeps, and managing JSON files. 79 | 80 | ### Anti-Bot Detection 81 | 82 | - **Random Waits**: Implements random waits between actions. 83 | - **Human-like Actions**: Performs random actions during waiting periods. 84 | - **Detailed Logging**: Logs all activities for better traceability. 85 | 86 | ### Logging 87 | 88 | Maintains several log files to track activities and debug issues: 89 | 90 | - **upload_log.txt**: Keeps track of uploaded reels. 91 | - **status.json**: Tracks the last action times and other status information. 92 | - **random-upload-times.json**: Logs random sleep times between uploads. 93 | - **random-waits.json**: Logs random wait times. 94 | 95 | ### Dashboard 96 | 97 | Run the dashboard script to view detailed information: 98 | 99 | ```bash 100 | python dashboard.py 101 | ``` 102 | 103 | ### License 104 | 105 | This project is licensed under the MIT License. 106 | 107 | ### Contributing 108 | 109 | Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes. 110 | 111 | ### Disclaimer 112 | 113 | This script is intended for educational and personal use only. Use it responsibly and ensure you comply with Instagram’s terms of service and guidelines. -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/config_setup.py: -------------------------------------------------------------------------------- 1 | import yaml 2 | from cryptography.fernet import Fernet 3 | import getpass 4 | import os 5 | from input_helpers import get_input, get_boolean_input 6 | 7 | DEFAULT_TAGS = [ 8 | 'instagram', 'instadaily', 'LikeForFollow', 'LikesForLikes', 'LikeForLikes', 9 | 'FollowForFollow', 'LikeForLike', 'FollowForFollowBack', 'FollowBack', 10 | 'FollowMe', 'instalike', 'comment', 'follow', 'memes', 'funnymemes', 11 | 'memestagram', 'dankmemes', 'memelord', 'instamemes', 'instagood', 'love', 12 | 'photooftheday', 'picoftheday', 'likeforlikes', 'likes', 'followme', 13 | 'photography', 'beautiful', 'fashion', 'smile', 'me', 'followforfollowback', 14 | 'l', 'likeforfollow', 'myself', 'likeforlike', 'bhfyp', 'f', 'followback', 15 | 'followers', 'followforfollow', 'style', 'photo', 'happy', 'instamood', 16 | 'nature', 'trending', 'art', 'india', 'viral', 'explore', 'model', 'travel' 17 | ] 18 | 19 | def generate_key(): 20 | return Fernet.generate_key() 21 | 22 | def encrypt_credentials(username, password, key): 23 | cipher_suite = Fernet(key) 24 | encrypted_username = cipher_suite.encrypt(username).decode() 25 | encrypted_password = cipher_suite.encrypt(password).decode() 26 | return encrypted_username, encrypted_password 27 | 28 | def get_user_credentials(): 29 | username = input('Enter Instagram username: ').encode() 30 | password = getpass.getpass('Enter Instagram password: ').encode() 31 | return username, password 32 | 33 | def create_config(encrypted_username, encrypted_password, key): 34 | config = { 35 | 'instagram': { 36 | 'username': encrypted_username, 37 | 'password': encrypted_password 38 | }, 39 | 'key': key.decode(), 40 | 'scraping': { 41 | 'enabled': get_boolean_input('Enable scraping? (true/false): '), 42 | 'profiles': input('Enter profiles to scrape (space separated): '), 43 | 'num_reels': get_input('Number of reels to scrape per profile: ', int), 44 | 'scrape_interval_minutes': get_input('Interval between scrapes (minutes): ', int), 45 | 'like_reels': get_boolean_input('Like scraped videos? (true/false): ') 46 | }, 47 | 'uploading': { 48 | 'enabled': get_boolean_input('Enable uploading? (true/false): '), 49 | 'upload_interval_minutes': get_input('Interval between uploads (minutes): ', int), 50 | 'add_to_story': get_boolean_input('Add to story? (true/false): ') 51 | } 52 | } 53 | 54 | use_original_description = get_boolean_input('Use original description? (true/false): ') 55 | config['description'] = { 56 | 'use_original': use_original_description 57 | } 58 | 59 | if use_original_description: 60 | config['hashtags'] = { 61 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 62 | } 63 | if config['hashtags']['use_hashtags']: 64 | config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 65 | 66 | config['credit'] = { 67 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 68 | } 69 | else: 70 | custom_description = input('Enter custom description (leave blank to use default descriptions): ') 71 | config['description']['custom_description'] = custom_description 72 | 73 | config['hashtags'] = { 74 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 75 | } 76 | if config['hashtags']['use_hashtags']: 77 | config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 78 | 79 | config['credit'] = { 80 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 81 | } 82 | 83 | config['leave_comment'] = get_boolean_input('Leave comment on scraped videos? (true/false): ') 84 | if config['leave_comment']: 85 | config['comments'] = input('Enter comments (comma separated): ').split(',') 86 | 87 | config['deleting'] = { 88 | 'delete_interval_minutes': get_input('Interval between deletions (minutes): ', int) 89 | } 90 | 91 | config['custom_tags'] = input(f'Enter custom tags (space separated, leave blank for default: {DEFAULT_TAGS}): ').split() or DEFAULT_TAGS 92 | 93 | return config 94 | 95 | def save_config(config, filename='config.yaml'): 96 | with open(filename, 'w') as file: 97 | yaml.dump(config, file) 98 | print(f'Configuration saved to {filename}') 99 | 100 | def delete_files(files): 101 | for file in files: 102 | if os.path.exists(file): 103 | os.remove(file) 104 | print(f'Deleted {file}') 105 | 106 | def load_config(config_file='config.yaml'): 107 | with open(config_file, 'r') as file: 108 | return yaml.safe_load(file) 109 | 110 | def main(): 111 | key = generate_key() 112 | username, password = get_user_credentials() 113 | encrypted_username, encrypted_password = encrypt_credentials(username, password, key) 114 | 115 | config = create_config(encrypted_username, encrypted_password, key) 116 | save_config(config) 117 | 118 | delete_files(['status.json', 'last_scraped_timestamp.txt', 'random-upload-times.json', 'random-waits.json']) 119 | 120 | if __name__ == "__main__": 121 | main() 122 | -------------------------------------------------------------------------------- /Historic/Version 2.2 - 7282024/config_setup.py: -------------------------------------------------------------------------------- 1 | import yaml 2 | from cryptography.fernet import Fernet 3 | import getpass 4 | import os 5 | from input_helpers import get_input, get_boolean_input 6 | 7 | DEFAULT_TAGS = [ 8 | 'instagram', 'instadaily', 'LikeForFollow', 'LikesForLikes', 'LikeForLikes', 9 | 'FollowForFollow', 'LikeForLike', 'FollowForFollowBack', 'FollowBack', 10 | 'FollowMe', 'instalike', 'comment', 'follow', 'memes', 'funnymemes', 11 | 'memestagram', 'dankmemes', 'memelord', 'instamemes', 'instagood', 'love', 12 | 'photooftheday', 'picoftheday', 'likeforlikes', 'likes', 'followme', 13 | 'photography', 'beautiful', 'fashion', 'smile', 'me', 'followforfollowback', 14 | 'l', 'likeforfollow', 'myself', 'likeforlike', 'bhfyp', 'f', 'followback', 15 | 'followers', 'followforfollow', 'style', 'photo', 'happy', 'instamood', 16 | 'nature', 'trending', 'art', 'india', 'viral', 'explore', 'model', 'travel' 17 | ] 18 | 19 | def generate_key(): 20 | return Fernet.generate_key() 21 | 22 | def encrypt_credentials(username, password, key): 23 | cipher_suite = Fernet(key) 24 | encrypted_username = cipher_suite.encrypt(username).decode() 25 | encrypted_password = cipher_suite.encrypt(password).decode() 26 | return encrypted_username, encrypted_password 27 | 28 | def get_user_credentials(): 29 | username = input('Enter Instagram username: ').encode() 30 | password = getpass.getpass('Enter Instagram password: ').encode() 31 | return username, password 32 | 33 | def create_config(encrypted_username, encrypted_password, key): 34 | config = { 35 | 'instagram': { 36 | 'username': encrypted_username, 37 | 'password': encrypted_password 38 | }, 39 | 'key': key.decode(), 40 | 'scraping': { 41 | 'enabled': get_boolean_input('Enable scraping? (true/false): '), 42 | 'profiles': input('Enter profiles to scrape (space separated): '), 43 | 'num_reels': get_input('Number of reels to scrape per profile: ', int), 44 | 'scrape_interval_minutes': get_input('Interval between scrapes (minutes): ', int), 45 | 'like_reels': get_boolean_input('Like scraped videos? (true/false): ') 46 | }, 47 | 'uploading': { 48 | 'enabled': get_boolean_input('Enable uploading? (true/false): '), 49 | 'upload_interval_minutes': get_input('Interval between uploads (minutes): ', int), 50 | 'add_to_story': get_boolean_input('Add to story? (true/false): ') 51 | } 52 | } 53 | 54 | use_original_description = get_boolean_input('Use original description? (true/false): ') 55 | config['description'] = { 56 | 'use_original': use_original_description 57 | } 58 | 59 | if use_original_description: 60 | config['hashtags'] = { 61 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 62 | } 63 | if config['hashtags']['use_hashtags']: 64 | config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 65 | 66 | config['credit'] = { 67 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 68 | } 69 | else: 70 | custom_description = input('Enter custom description (leave blank to use default descriptions): ') 71 | config['description']['custom_description'] = custom_description 72 | 73 | config['hashtags'] = { 74 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 75 | } 76 | if config['hashtags']['use_hashtags']: 77 | config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 78 | 79 | config['credit'] = { 80 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 81 | } 82 | 83 | config['leave_comment'] = get_boolean_input('Leave comment on scraped videos? (true/false): ') 84 | if config['leave_comment']: 85 | config['comments'] = input('Enter comments (comma separated): ').split(',') 86 | 87 | config['deleting'] = { 88 | 'delete_interval_minutes': get_input('Interval between deletions (minutes): ', int) 89 | } 90 | 91 | config['custom_tags'] = input(f'Enter custom tags (space separated, leave blank for default: {DEFAULT_TAGS}): ').split() or DEFAULT_TAGS 92 | 93 | return config 94 | 95 | def save_config(config, filename='config.yaml'): 96 | with open(filename, 'w') as file: 97 | yaml.dump(config, file) 98 | print(f'Configuration saved to {filename}') 99 | 100 | def delete_files(files): 101 | for file in files: 102 | if os.path.exists(file): 103 | os.remove(file) 104 | print(f'Deleted {file}') 105 | 106 | def load_config(config_file='config.yaml'): 107 | with open(config_file, 'r') as file: 108 | return yaml.safe_load(file) 109 | 110 | def main(): 111 | key = generate_key() 112 | username, password = get_user_credentials() 113 | encrypted_username, encrypted_password = encrypt_credentials(username, password, key) 114 | 115 | config = create_config(encrypted_username, encrypted_password, key) 116 | save_config(config) 117 | 118 | delete_files(['status.json', 'last_scraped_timestamp.txt', 'random-upload-times.json', 'random-waits.json']) 119 | 120 | if __name__ == "__main__": 121 | main() 122 | -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/config_setup.py: -------------------------------------------------------------------------------- 1 | print("="*80) 2 | print("Created by: Sujay1599") 3 | print("Program: InstgramTheftyScraperPosterHuman") 4 | print("Working as of: 7/20/2024") 5 | print("="*80) 6 | 7 | import yaml 8 | from cryptography.fernet import Fernet 9 | import getpass 10 | import os 11 | from input_helpers import get_input, get_boolean_input 12 | 13 | DEFAULT_TAGS = [ 14 | 'instagram', 'instadaily', 'LikeForFollow', 'LikesForLikes', 'LikeForLikes', 15 | 'FollowForFollow', 'LikeForLike', 'FollowForFollowBack', 'FollowBack', 16 | 'FollowMe', 'instalike', 'comment', 'follow', 'memes', 'funnymemes', 17 | 'memestagram', 'dankmemes', 'memelord', 'instamemes', 'instagood', 'love', 18 | 'photooftheday', 'picoftheday', 'likeforlikes', 'likes', 'followme', 19 | 'photography', 'beautiful', 'fashion', 'smile', 'me', 'followforfollowback', 20 | 'l', 'likeforfollow', 'myself', 'likeforlike', 'bhfyp', 'f', 'followback', 21 | 'followers', 'followforfollow', 'style', 'photo', 'happy', 'instamood', 22 | 'nature', 'trending', 'art', 'india', 'viral', 'explore', 'model', 'travel' 23 | ] 24 | 25 | def generate_key(): 26 | return Fernet.generate_key() 27 | 28 | def encrypt_credentials(username, password, key): 29 | cipher_suite = Fernet(key) 30 | encrypted_username = cipher_suite.encrypt(username).decode() 31 | encrypted_password = cipher_suite.encrypt(password).decode() 32 | return encrypted_username, encrypted_password 33 | 34 | def get_user_credentials(): 35 | username = input('Enter Instagram username: ').encode() 36 | password = getpass.getpass('Enter Instagram password: ').encode() 37 | return username, password 38 | 39 | def create_config(encrypted_username, encrypted_password, key): 40 | config = { 41 | 'instagram': { 42 | 'username': encrypted_username, 43 | 'password': encrypted_password 44 | }, 45 | 'key': key.decode(), 46 | 'scraping': { 47 | 'enabled': get_boolean_input('Enable scraping? (true/false): '), 48 | 'profiles': input('Enter profiles to scrape (space separated): '), 49 | 'num_reels': get_input('Number of reels to scrape per profile: ', int), 50 | 'scrape_interval_minutes': get_input('Interval between scrapes (minutes): ', int), 51 | 'like_reels': get_boolean_input('Like scraped videos? (true/false): ') 52 | }, 53 | 'uploading': { 54 | 'enabled': get_boolean_input('Enable uploading? (true/false): '), 55 | 'upload_interval_minutes': get_input('Interval between uploads (minutes): ', int), 56 | 'add_to_story': get_boolean_input('Add to story? (true/false): ') 57 | } 58 | } 59 | 60 | use_original_description = get_boolean_input('Use original description? (true/false): ') 61 | config['description'] = { 62 | 'use_original': use_original_description 63 | } 64 | 65 | if use_original_description: 66 | config['hashtags'] = { 67 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 68 | } 69 | if config['hashtags']['use_hashtags']: 70 | config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 71 | 72 | config['credit'] = { 73 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 74 | } 75 | else: 76 | config['description']['custom_description'] = input('Enter custom description: ') 77 | config['hashtags'] = { 78 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 79 | } 80 | if config['hashtags']['use_hashtags']: 81 | config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 82 | 83 | config['credit'] = { 84 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 85 | } 86 | 87 | config['leave_comment'] = get_boolean_input('Leave comment on scraped videos? (true/false): ') 88 | if config['leave_comment']: 89 | config['comments'] = input('Enter comments (comma separated): ').split(',') 90 | 91 | config['deleting'] = { 92 | 'delete_interval_minutes': get_input('Interval between deletions (minutes): ', int) 93 | } 94 | 95 | config['custom_tags'] = input(f'Enter custom tags (space separated, leave blank for default: {DEFAULT_TAGS}): ').split() or DEFAULT_TAGS 96 | 97 | return config 98 | 99 | def save_config(config, filename='config.yaml'): 100 | with open(filename, 'w') as file: 101 | yaml.dump(config, file) 102 | print(f'Configuration saved to {filename}') 103 | 104 | def delete_files(files): 105 | for file in files: 106 | if os.path.exists(file): 107 | os.remove(file) 108 | print(f'Deleted {file}') 109 | 110 | def load_config(config_file='config.yaml'): 111 | with open(config_file, 'r') as file: 112 | return yaml.safe_load(file) 113 | 114 | def main(): 115 | key = generate_key() 116 | username, password = get_user_credentials() 117 | encrypted_username, encrypted_password = encrypt_credentials(username, password, key) 118 | 119 | config = create_config(encrypted_username, encrypted_password, key) 120 | save_config(config) 121 | 122 | delete_files(['status.json', 'last_scraped_timestamp.txt', 'random-upload-times.json']) 123 | 124 | if __name__ == "__main__": 125 | main() 126 | -------------------------------------------------------------------------------- /Historic/Version 2.2 - 7282024/dashboard.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from rich.console import Console 4 | from rich.table import Table 5 | from datetime import datetime 6 | 7 | print("="*80) 8 | print("Created by: Sujay1599") 9 | print("Program: InstgramTheftyScraperPosterHuman") 10 | print("Working as of: 7/20/2024") 11 | print("="*80) 12 | 13 | status_file = 'status.json' 14 | log_file = 'upload_log.txt' 15 | random_upload_time_file = 'random-upload-times.json' 16 | random_waits_file = 'random-waits.json' 17 | downloads_dir = 'downloads' 18 | console = Console() 19 | 20 | def read_json_file(file_path): 21 | if not os.path.exists(file_path): 22 | console.print(f"[bold red]{file_path} not found.[/bold red]") 23 | return [] 24 | try: 25 | with open(file_path, 'r') as file: 26 | return json.load(file) 27 | except json.JSONDecodeError as e: 28 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 29 | return [] 30 | 31 | def read_text_file(file_path): 32 | if not os.path.exists(file_path): 33 | console.print(f"[bold red]{file_path} not found.[/bold red]") 34 | return [] 35 | try: 36 | with open(file_path, 'r') as file: 37 | return [line.strip() for line in file] 38 | except Exception as e: 39 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 40 | return [] 41 | 42 | def get_file_counts(): 43 | if not os.path.exists(downloads_dir): 44 | console.print("[bold red]Downloads directory not found.[/bold red]") 45 | return 0, [], 0, 0 46 | total_files = [f for f in os.listdir(downloads_dir) if f.endswith('.mp4')] 47 | uploaded_files = read_text_file(log_file) 48 | uploaded_files_set = set(uploaded_files) 49 | unuploaded_files = [f for f in total_files if f not in uploaded_files_set] 50 | folder_size = sum(os.path.getsize(os.path.join(downloads_dir, f)) for f in total_files) / (1024 * 1024) 51 | return len(total_files), uploaded_files, len(unuploaded_files), folder_size 52 | 53 | def format_time(timestamp): 54 | if not timestamp or timestamp == 'None': 55 | return "N/A" 56 | try: 57 | return datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') 58 | except (ValueError, TypeError): 59 | return "Invalid timestamp" 60 | 61 | def display_dashboard(): 62 | status = read_json_file(status_file) 63 | if not status: 64 | return 65 | 66 | uploads = read_text_file(log_file) 67 | random_upload_times = read_json_file(random_upload_time_file) 68 | random_waits = read_json_file(random_waits_file) 69 | total_files, uploaded_files, unuploaded_files, folder_size = get_file_counts() 70 | 71 | console.print("=" * 80, justify="left") 72 | console.print("[bold yellow]Instagram Thefty Poster Dashboard[/bold yellow]", justify="left") 73 | console.print("=" * 80, justify="left") 74 | 75 | table = Table(show_header=True, header_style="bold magenta") 76 | table.add_column("Scrape Status", justify="center") 77 | table.add_column("Upload Status", justify="center") 78 | 79 | table.add_row( 80 | f"Last Scrape Time: {format_time(status.get('last_scrape_time'))}\nNext Scrape Time: {format_time(status.get('next_scrape_time'))}", 81 | f"Last Upload Time: {format_time(status.get('last_upload_time'))}\nNext Upload Time: {format_time(status.get('next_upload_time'))}" 82 | ) 83 | console.print(table) 84 | 85 | file_table = Table(show_header=True, header_style="bold magenta") 86 | file_table.add_column("Metric", justify="center") 87 | file_table.add_column("Value", justify="center") 88 | 89 | file_table.add_row("Total .mp4 Files", str(total_files)) 90 | file_table.add_row("Uploaded .mp4 Files", str(len(uploaded_files))) 91 | file_table.add_row("Unuploaded .mp4 Files", str(unuploaded_files)) 92 | file_table.add_row("Downloads Folder Size (MB)", f"{folder_size:.2f}") 93 | 94 | console.print(file_table) 95 | 96 | console.print("[bold]Last 10 Uploads[/bold]") 97 | for upload in uploads[-10:]: 98 | console.print(f"- {upload}") 99 | 100 | console.print("[bold]Reels Scraped[/bold]") 101 | for reel in status.get('reels_scraped', []): 102 | console.print(f"- {reel}") 103 | 104 | console.print("[bold]Random Upload Times[/bold]") 105 | for item in random_upload_times[-10:]: 106 | if isinstance(item, dict): 107 | time_record = item.get('time', 'N/A') 108 | profile_reel_id = item.get('profile_reel_id', 'N/A') 109 | console.print(f"- {time_record} seconds for {profile_reel_id}") 110 | else: 111 | console.print(f"- {item}") 112 | 113 | console.print("[bold]Random Wait Times[/bold]") 114 | for item in random_waits[-10:]: 115 | if isinstance(item, dict): 116 | time_record = item.get('time', 'N/A') 117 | profile_reel_id = item.get('profile_reel_id', 'N/A') 118 | console.print(f"- {time_record} seconds for {profile_reel_id}") 119 | else: 120 | console.print(f"- {item}") 121 | 122 | table2 = Table(show_header=True, header_style="bold magenta") 123 | table2.add_column("Story Upload Status", justify="center") 124 | table2.add_column("Deletion Status", justify="center") 125 | 126 | table2.add_row( 127 | f"Last Story Upload Time: {format_time(status.get('last_story_upload_time'))}\nNext Story Upload Time: {format_time(status.get('next_story_upload_time'))}", 128 | f"Last Deletion Time: {format_time(status.get('last_delete_time'))}\nNext Deletion Time: {format_time(status.get('next_deletion_time'))}" 129 | ) 130 | console.print(table2) 131 | 132 | next_file = status.get('next_file_to_upload', 'N/A') 133 | console.print(f"[bold]Next File to Upload:[/bold] {next_file}") 134 | 135 | if __name__ == "__main__": 136 | display_dashboard() 137 | -------------------------------------------------------------------------------- /Historic/Version 3.1 81424/dashboard.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from rich.console import Console 4 | from rich.table import Table 5 | from datetime import datetime 6 | 7 | print("="*80) 8 | print("Created by: Sujay1599") 9 | print("Program: InstgramTheftyScraperPosterHuman") 10 | print("Version:2.2") 11 | print("Working as of: 7/28/2024") 12 | print("="*80) 13 | 14 | status_file = 'status.json' 15 | log_file = 'upload_log.txt' 16 | random_upload_time_file = 'random-upload-times.json' 17 | random_waits_file = 'random-waits.json' 18 | downloads_dir = 'downloads' 19 | console = Console() 20 | 21 | def read_json_file(file_path): 22 | if not os.path.exists(file_path): 23 | console.print(f"[bold red]{file_path} not found.[/bold red]") 24 | return {} 25 | try: 26 | with open(file_path, 'r') as file: 27 | return json.load(file) 28 | except json.JSONDecodeError as e: 29 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 30 | return {} 31 | 32 | def read_text_file(file_path): 33 | if not os.path.exists(file_path): 34 | console.print(f"[bold red]{file_path} not found.[/bold red]") 35 | return [] 36 | try: 37 | with open(file_path, 'r') as file: 38 | return [line.strip() for line in file] 39 | except Exception as e: 40 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 41 | return [] 42 | 43 | def get_file_counts(): 44 | if not os.path.exists(downloads_dir): 45 | console.print("[bold red]Downloads directory not found.[/bold red]") 46 | return 0, [], 0, 0 47 | total_files = [f for f in os.listdir(downloads_dir) if f.endswith('.mp4')] 48 | uploaded_files = read_text_file(log_file) 49 | uploaded_files_set = set(uploaded_files) 50 | unuploaded_files = [f for f in total_files if f not in uploaded_files_set] 51 | folder_size = sum(os.path.getsize(os.path.join(downloads_dir, f)) for f in total_files) / (1024 * 1024) 52 | return len(total_files), uploaded_files, len(unuploaded_files), folder_size 53 | 54 | def format_time(timestamp): 55 | if not timestamp or timestamp == 'None': 56 | return "N/A" 57 | try: 58 | return datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') 59 | except (ValueError, TypeError): 60 | return "Invalid timestamp" 61 | 62 | def display_dashboard(): 63 | status = read_json_file(status_file) 64 | if not status: 65 | return 66 | 67 | uploads = read_text_file(log_file) 68 | random_upload_times = read_json_file(random_upload_time_file) 69 | random_waits = read_json_file(random_waits_file) 70 | total_files, uploaded_files, unuploaded_files, folder_size = get_file_counts() 71 | 72 | console.print("=" * 80, justify="left") 73 | console.print("[bold yellow]Instagram Thefty Poster Dashboard[/bold yellow]", justify="left") 74 | console.print("=" * 80, justify="left") 75 | 76 | table = Table(show_header=True, header_style="bold magenta") 77 | table.add_column("Scrape Status", justify="center") 78 | table.add_column("Upload Status", justify="center") 79 | 80 | table.add_row( 81 | f"Last Scrape Time: {format_time(status.get('last_scrape_time'))}\nNext Scrape Time: {format_time(status.get('next_scrape_time'))}", 82 | f"Last Upload Time: {format_time(status.get('last_upload_time'))}\nNext Upload Time: {format_time(status.get('next_upload_time'))}" 83 | ) 84 | console.print(table) 85 | 86 | file_table = Table(show_header=True, header_style="bold magenta") 87 | file_table.add_column("Metric", justify="center") 88 | file_table.add_column("Value", justify="center") 89 | 90 | file_table.add_row("Total .mp4 Files", str(total_files)) 91 | file_table.add_row("Uploaded .mp4 Files", str(len(uploaded_files))) 92 | file_table.add_row("Unuploaded .mp4 Files", str(unuploaded_files)) 93 | file_table.add_row("Downloads Folder Size (MB)", f"{folder_size:.2f}") 94 | 95 | console.print(file_table) 96 | 97 | console.print("[bold]Last 10 Uploads[/bold]") 98 | for upload in uploads[-10:]: 99 | console.print(f"- {upload}") 100 | 101 | console.print("[bold]Reels Scraped[/bold]") 102 | for reel in status.get('reels_scraped', []): 103 | console.print(f"- {reel}") 104 | 105 | console.print("[bold]Random Upload Times[/bold]") 106 | for item in random_upload_times[-10:]: 107 | if isinstance(item, dict): 108 | time_record = item.get('time', 'N/A') 109 | profile_reel_id = item.get('profile_reel_id', 'N/A') 110 | console.print(f"- {time_record} seconds for {profile_reel_id}") 111 | else: 112 | console.print(f"- {item}") 113 | 114 | console.print("[bold]Random Wait Times[/bold]") 115 | for item in random_waits[-10:]: 116 | if isinstance(item, dict): 117 | time_record = item.get('time', 'N/A') 118 | profile_reel_id = item.get('profile_reel_id', 'N/A') 119 | console.print(f"- {time_record} seconds for {profile_reel_id}") 120 | else: 121 | console.print(f"- {item}") 122 | 123 | table2 = Table(show_header=True, header_style="bold magenta") 124 | table2.add_column("Story Upload Status", justify="center") 125 | table2.add_column("Deletion Status", justify="center") 126 | 127 | table2.add_row( 128 | f"Last Story Upload Time: {format_time(status.get('last_story_upload_time'))}\nNext Story Upload Time: {format_time(status.get('next_story_upload_time'))}", 129 | f"Last Deletion Time: {format_time(status.get('last_delete_time'))}\nNext Deletion Time: {format_time(status.get('next_deletion_time'))}" 130 | ) 131 | console.print(table2) 132 | 133 | next_file = status.get('next_file_to_upload', 'N/A') 134 | console.print(f"[bold]Next File to Upload:[/bold] {next_file}") 135 | 136 | if __name__ == "__main__": 137 | display_dashboard() 138 | -------------------------------------------------------------------------------- /Historic/Version 3.0 - 852024/dashboard.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from rich.console import Console 4 | from rich.table import Table 5 | from datetime import datetime 6 | 7 | print("="*80) 8 | print("Created by: Sujay1599") 9 | print("Program: InstgramTheftyScraperPosterHuman") 10 | print("Version:2.2") 11 | print("Working as of: 7/28/2024") 12 | print("="*80) 13 | 14 | status_file = 'status.json' 15 | log_file = 'upload_log.txt' 16 | random_upload_time_file = 'random-upload-times.json' 17 | random_waits_file = 'random-waits.json' 18 | downloads_dir = 'downloads' 19 | console = Console() 20 | 21 | def read_json_file(file_path): 22 | if not os.path.exists(file_path): 23 | console.print(f"[bold red]{file_path} not found.[/bold red]") 24 | return {} 25 | try: 26 | with open(file_path, 'r') as file: 27 | return json.load(file) 28 | except json.JSONDecodeError as e: 29 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 30 | return {} 31 | 32 | def read_text_file(file_path): 33 | if not os.path.exists(file_path): 34 | console.print(f"[bold red]{file_path} not found.[/bold red]") 35 | return [] 36 | try: 37 | with open(file_path, 'r') as file: 38 | return [line.strip() for line in file] 39 | except Exception as e: 40 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 41 | return [] 42 | 43 | def get_file_counts(): 44 | if not os.path.exists(downloads_dir): 45 | console.print("[bold red]Downloads directory not found.[/bold red]") 46 | return 0, [], 0, 0 47 | total_files = [f for f in os.listdir(downloads_dir) if f.endswith('.mp4')] 48 | uploaded_files = read_text_file(log_file) 49 | uploaded_files_set = set(uploaded_files) 50 | unuploaded_files = [f for f in total_files if f not in uploaded_files_set] 51 | folder_size = sum(os.path.getsize(os.path.join(downloads_dir, f)) for f in total_files) / (1024 * 1024) 52 | return len(total_files), uploaded_files, len(unuploaded_files), folder_size 53 | 54 | def format_time(timestamp): 55 | if not timestamp or timestamp == 'None': 56 | return "N/A" 57 | try: 58 | return datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') 59 | except (ValueError, TypeError): 60 | return "Invalid timestamp" 61 | 62 | def display_dashboard(): 63 | status = read_json_file(status_file) 64 | if not status: 65 | return 66 | 67 | uploads = read_text_file(log_file) 68 | random_upload_times = read_json_file(random_upload_time_file) 69 | random_waits = read_json_file(random_waits_file) 70 | total_files, uploaded_files, unuploaded_files, folder_size = get_file_counts() 71 | 72 | console.print("=" * 80, justify="left") 73 | console.print("[bold yellow]Instagram Thefty Poster Dashboard[/bold yellow]", justify="left") 74 | console.print("=" * 80, justify="left") 75 | 76 | table = Table(show_header=True, header_style="bold magenta") 77 | table.add_column("Scrape Status", justify="center") 78 | table.add_column("Upload Status", justify="center") 79 | 80 | table.add_row( 81 | f"Last Scrape Time: {format_time(status.get('last_scrape_time'))}\nNext Scrape Time: {format_time(status.get('next_scrape_time'))}", 82 | f"Last Upload Time: {format_time(status.get('last_upload_time'))}\nNext Upload Time: {format_time(status.get('next_upload_time'))}" 83 | ) 84 | console.print(table) 85 | 86 | file_table = Table(show_header=True, header_style="bold magenta") 87 | file_table.add_column("Metric", justify="center") 88 | file_table.add_column("Value", justify="center") 89 | 90 | file_table.add_row("Total .mp4 Files", str(total_files)) 91 | file_table.add_row("Uploaded .mp4 Files", str(len(uploaded_files))) 92 | file_table.add_row("Unuploaded .mp4 Files", str(unuploaded_files)) 93 | file_table.add_row("Downloads Folder Size (MB)", f"{folder_size:.2f}") 94 | 95 | console.print(file_table) 96 | 97 | console.print("[bold]Last 10 Uploads[/bold]") 98 | for upload in uploads[-10:]: 99 | console.print(f"- {upload}") 100 | 101 | console.print("[bold]Reels Scraped[/bold]") 102 | for reel in status.get('reels_scraped', []): 103 | console.print(f"- {reel}") 104 | 105 | console.print("[bold]Random Upload Times[/bold]") 106 | for item in random_upload_times[-10:]: 107 | if isinstance(item, dict): 108 | time_record = item.get('time', 'N/A') 109 | profile_reel_id = item.get('profile_reel_id', 'N/A') 110 | console.print(f"- {time_record} seconds for {profile_reel_id}") 111 | else: 112 | console.print(f"- {item}") 113 | 114 | console.print("[bold]Random Wait Times[/bold]") 115 | for item in random_waits[-10:]: 116 | if isinstance(item, dict): 117 | time_record = item.get('time', 'N/A') 118 | profile_reel_id = item.get('profile_reel_id', 'N/A') 119 | console.print(f"- {time_record} seconds for {profile_reel_id}") 120 | else: 121 | console.print(f"- {item}") 122 | 123 | table2 = Table(show_header=True, header_style="bold magenta") 124 | table2.add_column("Story Upload Status", justify="center") 125 | table2.add_column("Deletion Status", justify="center") 126 | 127 | table2.add_row( 128 | f"Last Story Upload Time: {format_time(status.get('last_story_upload_time'))}\nNext Story Upload Time: {format_time(status.get('next_story_upload_time'))}", 129 | f"Last Deletion Time: {format_time(status.get('last_delete_time'))}\nNext Deletion Time: {format_time(status.get('next_deletion_time'))}" 130 | ) 131 | console.print(table2) 132 | 133 | next_file = status.get('next_file_to_upload', 'N/A') 134 | console.print(f"[bold]Next File to Upload:[/bold] {next_file}") 135 | 136 | if __name__ == "__main__": 137 | display_dashboard() 138 | -------------------------------------------------------------------------------- /Historic/Version 3.0 - 852024/scrape.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import random 3 | import os 4 | from time import sleep 5 | from datetime import datetime 6 | from tqdm import tqdm 7 | from rich.console import Console 8 | from utils import update_status, read_status, random_sleep, sleep_with_progress_bar 9 | from default_comments import DEFAULT_COMMENTS 10 | 11 | console = Console() 12 | 13 | def perform_human_actions(client, tags): 14 | if not tags: 15 | console.print(f"[bold bright_red]No tags provided for human-like actions.[/bold bright_red]") 16 | return 17 | 18 | random_tag = random.choice(tags) 19 | console.print(f"[bold yellow]Performing human-like actions on tag: {random_tag}[/bold yellow]") 20 | 21 | actions = [ 22 | lambda tag: client.hashtag_medias_recent_v1(tag, amount=10), 23 | lambda tag: client.hashtag_medias_top_v1(tag, amount=9), 24 | lambda tag: client.hashtag_medias_top(tag, amount=9) 25 | ] 26 | 27 | try: 28 | action = random.choice(actions) 29 | medias = action(random_tag) 30 | 31 | if medias: 32 | console.print(f"[bold yellow]Media found using {action.__name__}.[/bold yellow]") 33 | media = random.choice(medias) 34 | media_id = media.pk 35 | 36 | # Randomly like or unlike media 37 | if random.random() < 0.5: 38 | if client.media_likers(media_id).usernames: 39 | client.media_unlike(media_id) 40 | console.print(f"[bold yellow]Unliked random media: {media_id} from tag: {random_tag}.[/bold yellow]") 41 | else: 42 | client.media_like(media_id) 43 | console.print(f"[bold yellow]Liked random media: {media_id} from tag: {random_tag}.[/bold yellow]") 44 | else: 45 | client.media_like(media_id) 46 | console.print(f"[bold yellow]Liked random media: {media_id} from tag: {random_tag}.[/bold yellow]") 47 | 48 | # Random follow/unfollow 49 | if random.random() < 0.1: 50 | user_to_follow = media.user.pk 51 | if client.user_following(client.user_id).get(user_to_follow): 52 | client.user_unfollow(user_to_follow) 53 | console.print(f"[bold yellow]Unfollowed user: {user_to_follow}.[/bold yellow]") 54 | else: 55 | client.user_follow(user_to_follow) 56 | console.print(f"[bold yellow]Followed user: {user_to_follow}.[/bold yellow]") 57 | 58 | # Random comments 59 | if random.random() < 0.1: 60 | comment_text = random.choice(DEFAULT_COMMENTS) 61 | client.media_comment(media_id, comment_text) 62 | console.print(f"[bold yellow]Commented on media: {media_id} with text: {comment_text}.[/bold yellow]") 63 | 64 | # Randomly view stories 65 | if random.random() < 0.1: 66 | stories = client.user_stories(user_to_follow) 67 | if stories: 68 | story_to_view = random.choice(stories) 69 | client.story_seen(story_to_view.id) 70 | console.print(f"[bold yellow]Viewed story: {story_to_view.id}.[/bold yellow]") 71 | 72 | sleep_time = random.uniform(5, 15) 73 | console.print(f"[bold yellow]Sleeping for {sleep_time:.2f} seconds to mimic human behavior.[/bold yellow]") 74 | sleep(sleep_time) 75 | else: 76 | console.print(f"[bold bright_red]No media found for tag: {random_tag}.[/bold bright_red]") 77 | except Exception as e: 78 | console.print(f"[bold red]Failed to perform human-like actions: {e}.[/bold red]") 79 | logging.error(f"Failed to perform human-like actions: {e}") 80 | 81 | def scrape_reels(client, profile, num_reels, last_scrape_time, uploaded_reels, scraped_reels, tags): 82 | user_id = client.user_id_from_username(profile) 83 | reels = [] 84 | new_scraped_reels = [] 85 | 86 | for reel in client.user_clips(user_id, amount=num_reels): 87 | reel_id_str = str(reel.pk) # Ensure reel_id is treated as a string 88 | profile_reel_id = f"{profile}_{reel_id_str}" 89 | if profile_reel_id in uploaded_reels or profile_reel_id in scraped_reels: 90 | continue 91 | 92 | try: 93 | media_path = client.clip_download(reel.pk, folder='downloads') 94 | if media_path: 95 | description_path = os.path.join('downloads', f'{reel_id_str}.txt') 96 | with open(description_path, 'w', encoding='utf-8') as f: 97 | f.write(reel.caption_text or '') 98 | 99 | reels.append(reel) 100 | new_scraped_reels.append(profile_reel_id) 101 | 102 | if random.random() < 0.01: # Perform human-like actions 1% of the time 103 | perform_human_actions(client, tags) 104 | console.print(f"[bold bright_green]Scraped and saved reel: {profile_reel_id}.[/bold bright_green]") 105 | 106 | sleep_time = random_sleep(10, 60, action="next reel scrape", profile_reel_id=profile_reel_id) 107 | console.print(f"[bold bright_green]Sleeping for {sleep_time:.2f} seconds before next reel scrape.[/bold bright_green]") 108 | sleep_with_progress_bar(sleep_time) 109 | 110 | # Update status after each reel is scraped 111 | status = read_status() 112 | status['reels_scraped'].append(profile_reel_id) 113 | update_status(last_scrape_time=datetime.now().timestamp(), reels_scraped=status['reels_scraped']) 114 | 115 | except Exception as e: 116 | console.print(f"[bold red]Failed to scrape or save reel {profile_reel_id}: {e}.[/bold red]") 117 | logging.error(f"Failed to scrape or save reel {profile_reel_id}: {e}") 118 | 119 | return new_scraped_reels 120 | -------------------------------------------------------------------------------- /Historic/Version 3.1 81424/scrape.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import random 3 | import os 4 | from time import sleep 5 | from datetime import datetime 6 | from tqdm import tqdm 7 | from rich.console import Console 8 | from utils import update_status, read_status, random_sleep, sleep_with_progress_bar 9 | from default_comments import DEFAULT_COMMENTS 10 | 11 | console = Console() 12 | 13 | def perform_human_actions(client, tags): 14 | if not tags: 15 | console.print(f"[bold bright_red]No tags provided for human-like actions.[/bold bright_red]") 16 | return 17 | 18 | random_tag = random.choice(tags) 19 | console.print(f"[bold yellow]Performing human-like actions on tag: {random_tag}[/bold yellow]") 20 | 21 | actions = [ 22 | lambda tag: client.hashtag_medias_recent_v1(tag, amount=10), 23 | lambda tag: client.hashtag_medias_top_v1(tag, amount=9), 24 | lambda tag: client.hashtag_medias_top(tag, amount=9) 25 | ] 26 | 27 | try: 28 | action = random.choice(actions) 29 | medias = action(random_tag) 30 | 31 | if medias: 32 | console.print(f"[bold yellow]Media found using {action.__name__}.[/bold yellow]") 33 | media = random.choice(medias) 34 | media_id = media.pk 35 | 36 | # Randomly like or unlike media 37 | if random.random() < 0.5: 38 | if client.media_likers(media_id).usernames: 39 | client.media_unlike(media_id) 40 | console.print(f"[bold yellow]Unliked random media: {media_id} from tag: {random_tag}.[/bold yellow]") 41 | else: 42 | client.media_like(media_id) 43 | console.print(f"[bold yellow]Liked random media: {media_id} from tag: {random_tag}.[/bold yellow]") 44 | else: 45 | client.media_like(media_id) 46 | console.print(f"[bold yellow]Liked random media: {media_id} from tag: {random_tag}.[/bold yellow]") 47 | 48 | # Random follow/unfollow 49 | if random.random() < 0.1: 50 | user_to_follow = media.user.pk 51 | if client.user_following(client.user_id).get(user_to_follow): 52 | client.user_unfollow(user_to_follow) 53 | console.print(f"[bold yellow]Unfollowed user: {user_to_follow}.[/bold yellow]") 54 | else: 55 | client.user_follow(user_to_follow) 56 | console.print(f"[bold yellow]Followed user: {user_to_follow}.[/bold yellow]") 57 | 58 | # Random comments 59 | if random.random() < 0.1: 60 | comment_text = random.choice(DEFAULT_COMMENTS) 61 | client.media_comment(media_id, comment_text) 62 | console.print(f"[bold yellow]Commented on media: {media_id} with text: {comment_text}.[/bold yellow]") 63 | 64 | # Randomly view stories 65 | if random.random() < 0.1: 66 | stories = client.user_stories(user_to_follow) 67 | if stories: 68 | story_to_view = random.choice(stories) 69 | client.story_seen(story_to_view.id) 70 | console.print(f"[bold yellow]Viewed story: {story_to_view.id}.[/bold yellow]") 71 | 72 | sleep_time = random.uniform(5, 15) 73 | console.print(f"[bold yellow]Sleeping for {sleep_time:.2f} seconds to mimic human behavior.[/bold yellow]") 74 | sleep(sleep_time) 75 | else: 76 | console.print(f"[bold bright_red]No media found for tag: {random_tag}.[/bold bright_red]") 77 | except Exception as e: 78 | console.print(f"[bold red]Failed to perform human-like actions: {e}.[/bold red]") 79 | logging.error(f"Failed to perform human-like actions: {e}") 80 | 81 | def scrape_reels(client, profile, num_reels, last_scrape_time, uploaded_reels, scraped_reels, tags): 82 | user_id = client.user_id_from_username(profile) 83 | reels = [] 84 | new_scraped_reels = [] 85 | 86 | for reel in client.user_clips(user_id, amount=num_reels): 87 | reel_id_str = str(reel.pk) # Ensure reel_id is treated as a string 88 | profile_reel_id = f"{profile}_{reel_id_str}" 89 | if profile_reel_id in uploaded_reels or profile_reel_id in scraped_reels: 90 | continue 91 | 92 | try: 93 | media_path = client.clip_download(reel.pk, folder='downloads') 94 | if media_path: 95 | description_path = os.path.join('downloads', f'{reel_id_str}.txt') 96 | with open(description_path, 'w', encoding='utf-8') as f: 97 | f.write(reel.caption_text or '') 98 | 99 | reels.append(reel) 100 | new_scraped_reels.append(profile_reel_id) 101 | 102 | if random.random() < 0.01: # Perform human-like actions 1% of the time 103 | perform_human_actions(client, tags) 104 | console.print(f"[bold bright_green]Scraped and saved reel: {profile_reel_id}.[/bold bright_green]") 105 | 106 | sleep_time = random_sleep(10, 60, action="next reel scrape", profile_reel_id=profile_reel_id) 107 | console.print(f"[bold bright_green]Sleeping for {sleep_time:.2f} seconds before next reel scrape.[/bold bright_green]") 108 | sleep_with_progress_bar(sleep_time) 109 | 110 | # Update status after each reel is scraped 111 | status = read_status() 112 | status['reels_scraped'].append(profile_reel_id) 113 | update_status(last_scrape_time=datetime.now().timestamp(), reels_scraped=status['reels_scraped']) 114 | 115 | except Exception as e: 116 | console.print(f"[bold red]Failed to scrape or save reel {profile_reel_id}: {e}.[/bold red]") 117 | logging.error(f"Failed to scrape or save reel {profile_reel_id}: {e}") 118 | 119 | return new_scraped_reels 120 | -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/main.py: -------------------------------------------------------------------------------- 1 | print("="*80) 2 | print("Created by: Sujay1599") 3 | print("Program: InstgramTheftyScraperPosterHuman") 4 | print("Working as of: 7/20/2024") 5 | print("="*80) 6 | 7 | import logging 8 | import os 9 | import random 10 | import json 11 | from time import time, sleep 12 | from tqdm import tqdm 13 | from config_setup import load_config 14 | from auth import login, decrypt_credentials 15 | from instagrapi import Client 16 | from scrape import scrape_reels, perform_human_actions 17 | from upload import upload_reels_with_new_descriptions, get_unuploaded_reels, load_uploaded_reels 18 | from utils import initialize_status_file, read_status, update_status, random_sleep, log_random_upload_times, log_random_waits, initialize_json_file, sleep_with_progress_bar 19 | import subprocess 20 | 21 | logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') 22 | 23 | # Ensure the downloads directory exists 24 | downloads_dir = 'downloads' 25 | if not os.path.exists(downloads_dir): 26 | os.makedirs(downloads_dir) 27 | logging.info(f"Created directory: {downloads_dir}") 28 | 29 | # Delete old files if they exist 30 | for file in ['status.json', 'last_scraped_timestamp.txt', 'random-upload-times.json', 'random-waits.json']: 31 | if os.path.exists(file): 32 | os.remove(file) 33 | logging.info(f"Deleted {file}") 34 | 35 | # Initialize files 36 | initialize_status_file() 37 | logging.info("Initialized status file") 38 | 39 | # Initialize random-upload-times.json and random-waits.json 40 | initialize_json_file('random-upload-times.json') 41 | initialize_json_file('random-waits.json') 42 | 43 | config = load_config() 44 | logging.info("Loaded configuration") 45 | 46 | INSTAGRAM_USERNAME, INSTAGRAM_PASSWORD = decrypt_credentials(config) 47 | logging.info("Decrypted Instagram credentials") 48 | 49 | cl = Client() 50 | 51 | login(cl, INSTAGRAM_USERNAME, INSTAGRAM_PASSWORD, 'session.json') 52 | logging.info("Logged in to Instagram") 53 | 54 | def main(): 55 | status = read_status() 56 | logging.info("Read initial status") 57 | 58 | uploaded_reels = load_uploaded_reels('upload_log.txt') 59 | logging.info(f"Loaded uploaded reels: {len(uploaded_reels)} reels") 60 | 61 | tags = config.get('custom_tags', []) 62 | 63 | while True: 64 | current_time = time() 65 | logging.debug(f"Current time: {current_time}") 66 | 67 | last_scrape_time = status.get('last_scrape_time', 0) or 0 68 | last_upload_time = status.get('last_upload_time', 0) or 0 69 | logging.debug(f"Last scrape time: {last_scrape_time}, Last upload time: {last_upload_time}") 70 | 71 | if (current_time - last_scrape_time) >= 60 * 60: 72 | if config['scraping']['enabled']: 73 | for profile in config['scraping']['profiles'].split(): 74 | logging.info(f"Scraping profile: {profile}") 75 | scraped_reels = scrape_reels(cl, profile, config['scraping']['num_reels'], last_scrape_time, uploaded_reels, status['reels_scraped']) 76 | status['reels_scraped'].extend(scraped_reels) 77 | update_status(last_scrape_time=current_time, reels_scraped=status['reels_scraped']) 78 | logging.info("Updated status after scraping") 79 | logging.info("Finished scraping reels from profiles") 80 | logging.info("Displaying dashboard before waiting phase") 81 | subprocess.run(["python", "dashboard.py"]) 82 | 83 | # Randomly perform human-like actions 84 | if random.random() < 0.5: 85 | perform_human_actions(cl, tags) 86 | wait_time = random_sleep(60, 90, action="uploading phase") # Increased wait time before moving to uploading 87 | logging.info(f"Waited for {wait_time:.2f} seconds before moving to the uploading phase") 88 | sleep_with_progress_bar(wait_time) 89 | 90 | if (current_time - last_upload_time) >= config['uploading']['upload_interval_minutes'] * 60: 91 | if config['uploading']['enabled']: 92 | logging.info("Starting upload process") 93 | unuploaded_reels = get_unuploaded_reels('downloads', status['reels_scraped'], uploaded_reels) 94 | if not unuploaded_reels: 95 | logging.info("No new reels to upload, initiating scraping protocol.") 96 | for profile in config['scraping']['profiles'].split(): 97 | logging.info(f"Scraping profile: {profile}") 98 | scraped_reels = scrape_reels(cl, profile, config['scraping']['num_reels'], last_scrape_time, uploaded_reels, status['reels_scraped']) 99 | status['reels_scraped'].extend(scraped_reels) 100 | update_status(last_scrape_time=current_time, reels_scraped=status['reels_scraped']) 101 | logging.info("Updated status after scraping") 102 | logging.info("Finished scraping reels from profiles") 103 | logging.info("Displaying dashboard before waiting phase") 104 | subprocess.run(["python", "dashboard.py"]) 105 | else: 106 | upload_reels_with_new_descriptions(cl, config, unuploaded_reels, uploaded_reels, 'upload_log.txt') 107 | update_status(last_upload_time=current_time) 108 | logging.info("Finished uploading reels") 109 | 110 | # Randomly perform human-like actions 111 | if random.random() < 0.5: 112 | perform_human_actions(cl, tags) 113 | 114 | logging.info("Displaying dashboard before waiting phase") 115 | subprocess.run(["python", "dashboard.py"]) 116 | 117 | # Randomly perform human-like actions during the waiting period 118 | if random.random() < 0.5: 119 | perform_human_actions(cl, tags) 120 | 121 | sleep_with_progress_bar(60) 122 | logging.debug("Sleeping for 60 seconds before next iteration") 123 | 124 | if __name__ == "__main__": 125 | main() 126 | -------------------------------------------------------------------------------- /dashboard.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from rich.console import Console 4 | from rich.table import Table 5 | from datetime import datetime 6 | 7 | status_file = 'status.json' 8 | log_file = 'upload_log.txt' 9 | random_upload_time_file = 'random-upload-times.json' 10 | random_waits_file = 'random-waits.json' 11 | downloads_dir = 'downloads' 12 | console = Console() 13 | 14 | def read_json_file(file_path): 15 | """Read a JSON file and return its contents, or return an empty dictionary if the file doesn't exist or is corrupted.""" 16 | if not os.path.exists(file_path): 17 | console.print(f"[bold red]{file_path} not found.[/bold red]") 18 | return {} 19 | try: 20 | with open(file_path, 'r') as file: 21 | return json.load(file) 22 | except json.JSONDecodeError as e: 23 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 24 | return {} 25 | 26 | def read_text_file(file_path): 27 | """Read a text file line by line, returning a list of lines or an empty list if the file doesn't exist or is corrupted.""" 28 | if not os.path.exists(file_path): 29 | console.print(f"[bold red]{file_path} not found.[/bold red]") 30 | return [] 31 | try: 32 | with open(file_path, 'r') as file: 33 | return [line.strip() for line in file] 34 | except Exception as e: 35 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 36 | return [] 37 | 38 | def get_file_counts(): 39 | """Return the count of total, uploaded, and unuploaded .mp4 files in the downloads directory, along with the folder size.""" 40 | if not os.path.exists(downloads_dir): 41 | console.print("[bold red]Downloads directory not found.[/bold red]") 42 | return 0, [], 0, 0 43 | total_files = [f for f in os.listdir(downloads_dir) if f.endswith('.mp4')] 44 | uploaded_files = read_text_file(log_file) 45 | uploaded_files_set = set(uploaded_files) 46 | unuploaded_files = [f for f in total_files if f not in uploaded_files_set] 47 | folder_size = sum(os.path.getsize(os.path.join(downloads_dir, f)) for f in total_files) / (1024 * 1024) 48 | return len(total_files), uploaded_files, len(unuploaded_files), folder_size 49 | 50 | def format_time(timestamp): 51 | """Convert a timestamp to a readable format.""" 52 | if not timestamp or timestamp == 'None': 53 | return "N/A" 54 | try: 55 | return datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') 56 | except (ValueError, TypeError): 57 | return "Invalid timestamp" 58 | 59 | def display_dashboard(): 60 | """Display the status dashboard with file counts, upload stats, and random wait/upload times.""" 61 | status = read_json_file(status_file) 62 | if not status: 63 | return 64 | 65 | uploads = read_text_file(log_file) 66 | random_upload_times = read_json_file(random_upload_time_file) 67 | random_waits = read_json_file(random_waits_file) 68 | total_files, uploaded_files, unuploaded_files, folder_size = get_file_counts() 69 | 70 | console.print("=" * 80, justify="left") 71 | console.print("[bold yellow]Instagram Thefty Poster Dashboard[/bold yellow]", justify="left") 72 | console.print("=" * 80, justify="left") 73 | 74 | table = Table(show_header=True, header_style="bold magenta") 75 | table.add_column("Scrape Status", justify="center") 76 | table.add_column("Upload Status", justify="center") 77 | 78 | table.add_row( 79 | f"Last Scrape Time: {format_time(status.get('last_scrape_time'))}\nNext Scrape Time: {format_time(status.get('next_scrape_time'))}", 80 | f"Last Upload Time: {format_time(status.get('last_upload_time'))}\nNext Upload Time: {format_time(status.get('next_upload_time'))}" 81 | ) 82 | console.print(table) 83 | 84 | file_table = Table(show_header=True, header_style="bold magenta") 85 | file_table.add_column("Metric", justify="center") 86 | file_table.add_column("Value", justify="center") 87 | 88 | file_table.add_row("Total .mp4 Files", str(total_files)) 89 | file_table.add_row("Uploaded .mp4 Files", str(len(uploaded_files))) 90 | file_table.add_row("Unuploaded .mp4 Files", str(unuploaded_files)) 91 | file_table.add_row("Downloads Folder Size (MB)", f"{folder_size:.2f}") 92 | 93 | console.print(file_table) 94 | 95 | console.print("[bold]Last 10 Uploads[/bold]") 96 | for upload in uploads[-10:]: 97 | console.print(f"- {upload}") 98 | 99 | console.print("[bold]Reels Scraped[/bold]") 100 | for reel in status.get('reels_scraped', []): 101 | console.print(f"- {reel}") 102 | 103 | console.print("[bold]Random Upload Times[/bold]") 104 | for item in random_upload_times[-10:]: 105 | if isinstance(item, dict): 106 | time_record = item.get('time', 'N/A') 107 | profile_reel_id = item.get('profile_reel_id', 'N/A') 108 | console.print(f"- {time_record} seconds for {profile_reel_id}") 109 | else: 110 | console.print(f"- {item}") 111 | 112 | console.print("[bold]Random Wait Times[/bold]") 113 | for item in random_waits[-10:]: 114 | if isinstance(item, dict): 115 | time_record = item.get('time', 'N/A') 116 | profile_reel_id = item.get('profile_reel_id', 'N/A') 117 | console.print(f"- {time_record} seconds for {profile_reel_id}") 118 | else: 119 | console.print(f"- {item}") 120 | 121 | table2 = Table(show_header=True, header_style="bold magenta") 122 | table2.add_column("Story Upload Status", justify="center") 123 | table2.add_column("Deletion Status", justify="center") 124 | 125 | table2.add_row( 126 | f"Last Story Upload Time: {format_time(status.get('last_story_upload_time'))}\nNext Story Upload Time: {format_time(status.get('next_story_upload_time'))}", 127 | f"Last Deletion Time: {format_time(status.get('last_delete_time'))}\nNext Deletion Time: {format_time(status.get('next_deletion_time'))}" 128 | ) 129 | console.print(table2) 130 | 131 | next_file = status.get('next_file_to_upload', 'N/A') 132 | console.print(f"[bold]Next File to Upload:[/bold] {next_file}") 133 | 134 | if __name__ == "__main__": 135 | display_dashboard() 136 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/dashboard.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from rich.console import Console 4 | from rich.table import Table 5 | from datetime import datetime 6 | 7 | print("="*80) 8 | print("Created by: Sujay1599") 9 | print("Program: InstgramTheftyScraperPosterHuman") 10 | print("Working as of: 7/20/2024") 11 | print("="*80) 12 | 13 | status_file = 'status.json' 14 | log_file = 'upload_log.txt' 15 | random_upload_time_file = 'random-upload-times.json' 16 | random_waits_file = 'random-waits.json' 17 | downloads_dir = 'downloads' 18 | console = Console() 19 | 20 | def read_json_file(file_path): 21 | if not os.path.exists(file_path): 22 | console.print(f"[bold red]{file_path} not found.[/bold red]") 23 | return [] 24 | try: 25 | with open(file_path, 'r') as file: 26 | return json.load(file) 27 | except json.JSONDecodeError as e: 28 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 29 | return [] 30 | 31 | def read_text_file(file_path): 32 | if not os.path.exists(file_path): 33 | console.print(f"[bold red]{file_path} not found.[/bold red]") 34 | return [] 35 | try: 36 | with open(file_path, 'r') as file: 37 | return [line.strip() for line in file] 38 | except Exception as e: 39 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 40 | return [] 41 | 42 | def get_file_counts(): 43 | if not os.path.exists(downloads_dir): 44 | console.print("[bold red]Downloads directory not found.[/bold red]") 45 | return 0, [], 0, 0 46 | total_files = [f for f in os.listdir(downloads_dir) if f.endswith('.mp4')] 47 | uploaded_files = read_text_file(log_file) 48 | uploaded_files_set = set(uploaded_files) 49 | unuploaded_files = [f for f in total_files if f not in uploaded_files_set] 50 | folder_size = sum(os.path.getsize(os.path.join(downloads_dir, f)) for f in total_files) / (1024 * 1024) 51 | return len(total_files), uploaded_files, len(unuploaded_files), folder_size 52 | 53 | def format_time(timestamp): 54 | if not timestamp or timestamp == 'None': 55 | return "N/A" 56 | try: 57 | return datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') 58 | except (ValueError, TypeError): 59 | return "Invalid timestamp" 60 | 61 | def extract_reel_id(reel_info): 62 | try: 63 | parts = reel_info.split(" ") 64 | reel_id = parts[0].split("=")[1] 65 | return reel_id 66 | except Exception as e: 67 | console.print(f"[bold red]Error extracting reel_id: {e}[/bold red]") 68 | return reel_info 69 | 70 | def display_dashboard(): 71 | status = read_json_file(status_file) 72 | if not status: 73 | return 74 | 75 | uploads = read_text_file(log_file) 76 | random_upload_times = read_json_file(random_upload_time_file) 77 | random_waits = read_json_file(random_waits_file) 78 | total_files, uploaded_files, unuploaded_files, folder_size = get_file_counts() 79 | 80 | console.print("=" * 80, justify="left") 81 | console.print("[bold yellow]Instagram Thefty Poster Dashboard[/bold yellow]", justify="left") 82 | console.print("=" * 80, justify="left") 83 | 84 | table = Table(show_header=True, header_style="bold magenta") 85 | table.add_column("Scrape Status", justify="center") 86 | table.add_column("Upload Status", justify="center") 87 | 88 | table.add_row( 89 | f"Last Scrape Time: {format_time(status.get('last_scrape_time'))}\nNext Scrape Time: {format_time(status.get('next_scrape_time'))}", 90 | f"Last Upload Time: {format_time(status.get('last_upload_time'))}\nNext Upload Time: {format_time(status.get('next_upload_time'))}" 91 | ) 92 | console.print(table) 93 | 94 | file_table = Table(show_header=True, header_style="bold magenta") 95 | file_table.add_column("Metric", justify="center") 96 | file_table.add_column("Value", justify="center") 97 | 98 | file_table.add_row("Total .mp4 Files", str(total_files)) 99 | file_table.add_row("Uploaded .mp4 Files", str(len(uploaded_files))) 100 | file_table.add_row("Unuploaded .mp4 Files", str(unuploaded_files)) 101 | file_table.add_row("Downloads Folder Size (MB)", f"{folder_size:.2f}") 102 | 103 | console.print(file_table) 104 | 105 | console.print("[bold]Last 10 Uploads[/bold]") 106 | for upload in uploads[-10:]: 107 | console.print(f"- {upload}") 108 | 109 | console.print("[bold]Reels Scraped[/bold]") 110 | for reel in status.get('reels_scraped', []): 111 | reel_id = extract_reel_id(reel) 112 | console.print(f"- {reel_id}") 113 | 114 | console.print("[bold]Random Upload Times[/bold]") 115 | for item in random_upload_times[-10:]: 116 | if isinstance(item, dict): 117 | time_record = item.get('time', 'N/A') 118 | profile_reel_id = item.get('profile_reel_id', 'N/A') 119 | console.print(f"- {time_record} seconds for {profile_reel_id}") 120 | else: 121 | console.print(f"- {item}") 122 | 123 | console.print("[bold]Random Wait Times[/bold]") 124 | for item in random_waits[-10:]: 125 | if isinstance(item, dict): 126 | time_record = item.get('time', 'N/A') 127 | profile_reel_id = item.get('profile_reel_id', 'N/A') 128 | console.print(f"- {time_record} seconds for {profile_reel_id}") 129 | else: 130 | console.print(f"- {item}") 131 | 132 | table2 = Table(show_header=True, header_style="bold magenta") 133 | table2.add_column("Story Upload Status", justify="center") 134 | table2.add_column("Deletion Status", justify="center") 135 | 136 | table2.add_row( 137 | f"Last Story Upload Time: {format_time(status.get('last_story_upload_time'))}\nNext Story Upload Time: {format_time(status.get('next_story_upload_time'))}", 138 | f"Last Deletion Time: {format_time(status.get('last_delete_time'))}\nNext Deletion Time: {format_time(status.get('next_deletion_time'))}" 139 | ) 140 | console.print(table2) 141 | 142 | next_file = status.get('next_file_to_upload', 'N/A') 143 | console.print(f"[bold]Next File to Upload:[/bold] {next_file}") 144 | 145 | if __name__ == "__main__": 146 | display_dashboard() 147 | -------------------------------------------------------------------------------- /Historic/Version - 3.2.1/dashboard.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from rich.console import Console 4 | from rich.table import Table 5 | from datetime import datetime 6 | 7 | status_file = 'status.json' 8 | log_file = 'upload_log.txt' 9 | random_upload_time_file = 'random-upload-times.json' 10 | random_waits_file = 'random-waits.json' 11 | downloads_dir = 'downloads' 12 | console = Console() 13 | 14 | def read_json_file(file_path): 15 | """Read a JSON file and return its contents, or return an empty dictionary if the file doesn't exist or is corrupted.""" 16 | if not os.path.exists(file_path): 17 | console.print(f"[bold red]{file_path} not found.[/bold red]") 18 | return {} 19 | try: 20 | with open(file_path, 'r') as file: 21 | return json.load(file) 22 | except json.JSONDecodeError as e: 23 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 24 | return {} 25 | 26 | def read_text_file(file_path): 27 | """Read a text file line by line, returning a list of lines or an empty list if the file doesn't exist or is corrupted.""" 28 | if not os.path.exists(file_path): 29 | console.print(f"[bold red]{file_path} not found.[/bold red]") 30 | return [] 31 | try: 32 | with open(file_path, 'r') as file: 33 | return [line.strip() for line in file] 34 | except Exception as e: 35 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 36 | return [] 37 | 38 | def get_file_counts(): 39 | """Return the count of total, uploaded, and unuploaded .mp4 files in the downloads directory, along with the folder size.""" 40 | if not os.path.exists(downloads_dir): 41 | console.print("[bold red]Downloads directory not found.[/bold red]") 42 | return 0, [], 0, 0 43 | total_files = [f for f in os.listdir(downloads_dir) if f.endswith('.mp4')] 44 | uploaded_files = read_text_file(log_file) 45 | uploaded_files_set = set(uploaded_files) 46 | unuploaded_files = [f for f in total_files if f not in uploaded_files_set] 47 | folder_size = sum(os.path.getsize(os.path.join(downloads_dir, f)) for f in total_files) / (1024 * 1024) 48 | return len(total_files), uploaded_files, len(unuploaded_files), folder_size 49 | 50 | def format_time(timestamp): 51 | """Convert a timestamp to a readable format.""" 52 | if not timestamp or timestamp == 'None': 53 | return "N/A" 54 | try: 55 | return datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') 56 | except (ValueError, TypeError): 57 | return "Invalid timestamp" 58 | 59 | def display_dashboard(): 60 | """Display the status dashboard with file counts, upload stats, and random wait/upload times.""" 61 | status = read_json_file(status_file) 62 | if not status: 63 | return 64 | 65 | uploads = read_text_file(log_file) 66 | random_upload_times = read_json_file(random_upload_time_file) 67 | random_waits = read_json_file(random_waits_file) 68 | total_files, uploaded_files, unuploaded_files, folder_size = get_file_counts() 69 | 70 | console.print("=" * 80, justify="left") 71 | console.print("[bold yellow]Instagram Thefty Poster Dashboard[/bold yellow]", justify="left") 72 | console.print("=" * 80, justify="left") 73 | 74 | table = Table(show_header=True, header_style="bold magenta") 75 | table.add_column("Scrape Status", justify="center") 76 | table.add_column("Upload Status", justify="center") 77 | 78 | table.add_row( 79 | f"Last Scrape Time: {format_time(status.get('last_scrape_time'))}\nNext Scrape Time: {format_time(status.get('next_scrape_time'))}", 80 | f"Last Upload Time: {format_time(status.get('last_upload_time'))}\nNext Upload Time: {format_time(status.get('next_upload_time'))}" 81 | ) 82 | console.print(table) 83 | 84 | file_table = Table(show_header=True, header_style="bold magenta") 85 | file_table.add_column("Metric", justify="center") 86 | file_table.add_column("Value", justify="center") 87 | 88 | file_table.add_row("Total .mp4 Files", str(total_files)) 89 | file_table.add_row("Uploaded .mp4 Files", str(len(uploaded_files))) 90 | file_table.add_row("Unuploaded .mp4 Files", str(unuploaded_files)) 91 | file_table.add_row("Downloads Folder Size (MB)", f"{folder_size:.2f}") 92 | 93 | console.print(file_table) 94 | 95 | console.print("[bold]Last 10 Uploads[/bold]") 96 | for upload in uploads[-10:]: 97 | console.print(f"- {upload}") 98 | 99 | console.print("[bold]Reels Scraped[/bold]") 100 | for reel in status.get('reels_scraped', []): 101 | console.print(f"- {reel}") 102 | 103 | console.print("[bold]Random Upload Times[/bold]") 104 | for item in random_upload_times[-10:]: 105 | if isinstance(item, dict): 106 | time_record = item.get('time', 'N/A') 107 | profile_reel_id = item.get('profile_reel_id', 'N/A') 108 | console.print(f"- {time_record} seconds for {profile_reel_id}") 109 | else: 110 | console.print(f"- {item}") 111 | 112 | console.print("[bold]Random Wait Times[/bold]") 113 | for item in random_waits[-10:]: 114 | if isinstance(item, dict): 115 | time_record = item.get('time', 'N/A') 116 | profile_reel_id = item.get('profile_reel_id', 'N/A') 117 | console.print(f"- {time_record} seconds for {profile_reel_id}") 118 | else: 119 | console.print(f"- {item}") 120 | 121 | table2 = Table(show_header=True, header_style="bold magenta") 122 | table2.add_column("Story Upload Status", justify="center") 123 | table2.add_column("Deletion Status", justify="center") 124 | 125 | table2.add_row( 126 | f"Last Story Upload Time: {format_time(status.get('last_story_upload_time'))}\nNext Story Upload Time: {format_time(status.get('next_story_upload_time'))}", 127 | f"Last Deletion Time: {format_time(status.get('last_delete_time'))}\nNext Deletion Time: {format_time(status.get('next_deletion_time'))}" 128 | ) 129 | console.print(table2) 130 | 131 | next_file = status.get('next_file_to_upload', 'N/A') 132 | console.print(f"[bold]Next File to Upload:[/bold] {next_file}") 133 | 134 | if __name__ == "__main__": 135 | display_dashboard() 136 | -------------------------------------------------------------------------------- /Historic/Version 3.2.0 - 92224/dashboard.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from rich.console import Console 4 | from rich.table import Table 5 | from datetime import datetime 6 | 7 | status_file = 'status.json' 8 | log_file = 'upload_log.txt' 9 | random_upload_time_file = 'random-upload-times.json' 10 | random_waits_file = 'random-waits.json' 11 | downloads_dir = 'downloads' 12 | console = Console() 13 | 14 | def read_json_file(file_path): 15 | """Read a JSON file and return its contents, or return an empty dictionary if the file doesn't exist or is corrupted.""" 16 | if not os.path.exists(file_path): 17 | console.print(f"[bold red]{file_path} not found.[/bold red]") 18 | return {} 19 | try: 20 | with open(file_path, 'r') as file: 21 | return json.load(file) 22 | except json.JSONDecodeError as e: 23 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 24 | return {} 25 | 26 | def read_text_file(file_path): 27 | """Read a text file line by line, returning a list of lines or an empty list if the file doesn't exist or is corrupted.""" 28 | if not os.path.exists(file_path): 29 | console.print(f"[bold red]{file_path} not found.[/bold red]") 30 | return [] 31 | try: 32 | with open(file_path, 'r') as file: 33 | return [line.strip() for line in file] 34 | except Exception as e: 35 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 36 | return [] 37 | 38 | def get_file_counts(): 39 | """Return the count of total, uploaded, and unuploaded .mp4 files in the downloads directory, along with the folder size.""" 40 | if not os.path.exists(downloads_dir): 41 | console.print("[bold red]Downloads directory not found.[/bold red]") 42 | return 0, [], 0, 0 43 | total_files = [f for f in os.listdir(downloads_dir) if f.endswith('.mp4')] 44 | uploaded_files = read_text_file(log_file) 45 | uploaded_files_set = set(uploaded_files) 46 | unuploaded_files = [f for f in total_files if f not in uploaded_files_set] 47 | folder_size = sum(os.path.getsize(os.path.join(downloads_dir, f)) for f in total_files) / (1024 * 1024) 48 | return len(total_files), uploaded_files, len(unuploaded_files), folder_size 49 | 50 | def format_time(timestamp): 51 | """Convert a timestamp to a readable format.""" 52 | if not timestamp or timestamp == 'None': 53 | return "N/A" 54 | try: 55 | return datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') 56 | except (ValueError, TypeError): 57 | return "Invalid timestamp" 58 | 59 | def display_dashboard(): 60 | """Display the status dashboard with file counts, upload stats, and random wait/upload times.""" 61 | status = read_json_file(status_file) 62 | if not status: 63 | return 64 | 65 | uploads = read_text_file(log_file) 66 | random_upload_times = read_json_file(random_upload_time_file) 67 | random_waits = read_json_file(random_waits_file) 68 | total_files, uploaded_files, unuploaded_files, folder_size = get_file_counts() 69 | 70 | console.print("=" * 80, justify="left") 71 | console.print("[bold yellow]Instagram Thefty Poster Dashboard[/bold yellow]", justify="left") 72 | console.print("=" * 80, justify="left") 73 | 74 | table = Table(show_header=True, header_style="bold magenta") 75 | table.add_column("Scrape Status", justify="center") 76 | table.add_column("Upload Status", justify="center") 77 | 78 | table.add_row( 79 | f"Last Scrape Time: {format_time(status.get('last_scrape_time'))}\nNext Scrape Time: {format_time(status.get('next_scrape_time'))}", 80 | f"Last Upload Time: {format_time(status.get('last_upload_time'))}\nNext Upload Time: {format_time(status.get('next_upload_time'))}" 81 | ) 82 | console.print(table) 83 | 84 | file_table = Table(show_header=True, header_style="bold magenta") 85 | file_table.add_column("Metric", justify="center") 86 | file_table.add_column("Value", justify="center") 87 | 88 | file_table.add_row("Total .mp4 Files", str(total_files)) 89 | file_table.add_row("Uploaded .mp4 Files", str(len(uploaded_files))) 90 | file_table.add_row("Unuploaded .mp4 Files", str(unuploaded_files)) 91 | file_table.add_row("Downloads Folder Size (MB)", f"{folder_size:.2f}") 92 | 93 | console.print(file_table) 94 | 95 | console.print("[bold]Last 10 Uploads[/bold]") 96 | for upload in uploads[-10:]: 97 | console.print(f"- {upload}") 98 | 99 | console.print("[bold]Reels Scraped[/bold]") 100 | for reel in status.get('reels_scraped', []): 101 | console.print(f"- {reel}") 102 | 103 | console.print("[bold]Random Upload Times[/bold]") 104 | for item in random_upload_times[-10:]: 105 | if isinstance(item, dict): 106 | time_record = item.get('time', 'N/A') 107 | profile_reel_id = item.get('profile_reel_id', 'N/A') 108 | console.print(f"- {time_record} seconds for {profile_reel_id}") 109 | else: 110 | console.print(f"- {item}") 111 | 112 | console.print("[bold]Random Wait Times[/bold]") 113 | for item in random_waits[-10:]: 114 | if isinstance(item, dict): 115 | time_record = item.get('time', 'N/A') 116 | profile_reel_id = item.get('profile_reel_id', 'N/A') 117 | console.print(f"- {time_record} seconds for {profile_reel_id}") 118 | else: 119 | console.print(f"- {item}") 120 | 121 | table2 = Table(show_header=True, header_style="bold magenta") 122 | table2.add_column("Story Upload Status", justify="center") 123 | table2.add_column("Deletion Status", justify="center") 124 | 125 | table2.add_row( 126 | f"Last Story Upload Time: {format_time(status.get('last_story_upload_time'))}\nNext Story Upload Time: {format_time(status.get('next_story_upload_time'))}", 127 | f"Last Deletion Time: {format_time(status.get('last_delete_time'))}\nNext Deletion Time: {format_time(status.get('next_deletion_time'))}" 128 | ) 129 | console.print(table2) 130 | 131 | next_file = status.get('next_file_to_upload', 'N/A') 132 | console.print(f"[bold]Next File to Upload:[/bold] {next_file}") 133 | 134 | if __name__ == "__main__": 135 | display_dashboard() 136 | -------------------------------------------------------------------------------- /Historic/Version 1 - 71820024/dashboard.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from rich.console import Console 4 | from rich.table import Table 5 | from datetime import datetime 6 | 7 | status_file = 'status.json' 8 | log_file = 'upload_log.txt' 9 | random_upload_time_file = 'random-upload-times.json' 10 | random_waits_file = 'random-waits.json' 11 | downloads_dir = 'downloads' 12 | console = Console() 13 | 14 | def read_json_file(file_path): 15 | if not os.path.exists(file_path): 16 | console.print(f"[bold red]{file_path} not found.[/bold red]") 17 | return [] 18 | try: 19 | with open(file_path, 'r') as file: 20 | return json.load(file) 21 | except json.JSONDecodeError as e: 22 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 23 | return [] 24 | 25 | def read_text_file(file_path): 26 | if not os.path.exists(file_path): 27 | console.print(f"[bold red]{file_path} not found.[/bold red]") 28 | return [] 29 | try: 30 | with open(file_path, 'r') as file: 31 | return [line.strip() for line in file] 32 | except Exception as e: 33 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 34 | return [] 35 | 36 | def get_file_counts(): 37 | if not os.path.exists(downloads_dir): 38 | console.print("[bold red]Downloads directory not found.[/bold red]") 39 | return 0, [], 0, 0 40 | total_files = [f for f in os.listdir(downloads_dir) if f.endswith('.mp4')] 41 | uploaded_files = read_text_file(log_file) 42 | uploaded_files_set = set(uploaded_files) 43 | unuploaded_files = [f for f in total_files if f not in uploaded_files_set] 44 | folder_size = sum(os.path.getsize(os.path.join(downloads_dir, f)) for f in total_files) / (1024 * 1024) 45 | return len(total_files), uploaded_files, len(unuploaded_files), folder_size 46 | 47 | def format_time(timestamp): 48 | if not timestamp or timestamp == 'None': 49 | return "N/A" 50 | try: 51 | return datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') 52 | except (ValueError, TypeError): 53 | return "Invalid timestamp" 54 | 55 | def extract_reel_id(reel_info): 56 | try: 57 | parts = reel_info.split(" ") 58 | reel_id = parts[0].split("=")[1] 59 | return reel_id 60 | except Exception as e: 61 | console.print(f"[bold red]Error extracting reel_id: {e}[/bold red]") 62 | return reel_info 63 | 64 | def display_dashboard(): 65 | status = read_json_file(status_file) 66 | if not status: 67 | return 68 | 69 | uploads = read_text_file(log_file) 70 | random_upload_times = read_json_file(random_upload_time_file) 71 | random_waits = read_json_file(random_waits_file) 72 | total_files, uploaded_files, unuploaded_files, folder_size = get_file_counts() 73 | 74 | console.print("="*80) 75 | console.print("Created by: Sujay1599") 76 | console.print("Program: InstgramTheftyScraperPosterHuman") 77 | console.print("Working as of: 7/20/2024") 78 | console.print("="*80) 79 | 80 | console.print("=" * 80, justify="left") 81 | console.print("[bold yellow]Instagram Thefty Poster Dashboard[/bold yellow]", justify="left") 82 | console.print("=" * 80, justify="left") 83 | 84 | table = Table(show_header=True, header_style="bold magenta") 85 | table.add_column("Scrape Status", justify="center") 86 | table.add_column("Upload Status", justify="center") 87 | 88 | table.add_row( 89 | f"Last Scrape Time: {format_time(status.get('last_scrape_time'))}\nNext Scrape Time: {format_time(status.get('next_scrape_time'))}", 90 | f"Last Upload Time: {format_time(status.get('last_upload_time'))}\nNext Upload Time: {format_time(status.get('next_upload_time'))}" 91 | ) 92 | console.print(table) 93 | 94 | file_table = Table(show_header=True, header_style="bold magenta") 95 | file_table.add_column("Metric", justify="center") 96 | file_table.add_column("Value", justify="center") 97 | 98 | file_table.add_row("Total .mp4 Files", str(total_files)) 99 | file_table.add_row("Uploaded .mp4 Files", str(len(uploaded_files))) 100 | file_table.add_row("Unuploaded .mp4 Files", str(unuploaded_files)) 101 | file_table.add_row("Downloads Folder Size (MB)", f"{folder_size:.2f}") 102 | 103 | console.print(file_table) 104 | 105 | console.print("[bold]Last 10 Uploads[/bold]") 106 | for upload in uploads[-10:]: 107 | console.print(f"- {upload}") 108 | 109 | console.print("[bold]Reels Scraped[/bold]") 110 | for reel in status.get('reels_scraped', []): 111 | reel_id = extract_reel_id(reel) 112 | console.print(f"- {reel_id}") 113 | 114 | console.print("[bold]Random Upload Times[/bold]") 115 | for item in random_upload_times[-10:]: 116 | if isinstance(item, dict): 117 | time_record = item.get('time', 'N/A') 118 | profile_reel_id = item.get('profile_reel_id', 'N/A') 119 | console.print(f"- {time_record} seconds for {profile_reel_id}") 120 | else: 121 | console.print(f"- {item}") 122 | 123 | console.print("[bold]Random Wait Times[/bold]") 124 | for item in random_waits[-10:]: 125 | if isinstance(item, dict): 126 | time_record = item.get('time', 'N/A') 127 | profile_reel_id = item.get('profile_reel_id', 'N/A') 128 | console.print(f"- {time_record} seconds for {profile_reel_id}") 129 | else: 130 | console.print(f"- {item}") 131 | 132 | table2 = Table(show_header=True, header_style="bold magenta") 133 | table2.add_column("Story Upload Status", justify="center") 134 | table2.add_column("Deletion Status", justify="center") 135 | 136 | table2.add_row( 137 | f"Last Story Upload Time: {format_time(status.get('last_story_upload_time'))}\nNext Story Upload Time: {format_time(status.get('next_story_upload_time'))}", 138 | f"Last Deletion Time: {format_time(status.get('last_delete_time'))}\nNext Deletion Time: {format_time(status.get('next_deletion_time'))}" 139 | ) 140 | console.print(table2) 141 | 142 | next_file = status.get('next_file_to_upload', 'N/A') 143 | console.print(f"[bold]Next File to Upload:[/bold] {next_file}") 144 | 145 | if __name__ == "__main__": 146 | display_dashboard() 147 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/main.py: -------------------------------------------------------------------------------- 1 | print("="*80) 2 | print("Created by: Sujay1599") 3 | print("Program: InstgramTheftyScraperPosterHuman") 4 | print("Working as of: 7/20/2024") 5 | print("="*80) 6 | 7 | import logging 8 | import os 9 | import random 10 | from time import time, sleep 11 | from tqdm import tqdm 12 | from config_setup import load_config 13 | from auth import login, decrypt_credentials 14 | from instagrapi import Client 15 | from scrape import scrape_reels, perform_human_actions 16 | from upload import upload_reels_with_new_descriptions, get_unuploaded_reels, load_uploaded_reels 17 | from utils import initialize_status_file, read_status, update_status, random_sleep, log_random_upload_times, log_random_waits, initialize_json_file, sleep_with_progress_bar, delete_old_reels 18 | import subprocess 19 | from rich.console import Console 20 | 21 | console = Console() 22 | 23 | logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') 24 | 25 | # Ensure the downloads directory exists 26 | downloads_dir = 'downloads' 27 | if not os.path.exists(downloads_dir): 28 | os.makedirs(downloads_dir) 29 | logging.info(f"Created directory: {downloads_dir}") 30 | 31 | # Initialize files 32 | initialize_status_file() 33 | logging.info("Initialized status file") 34 | 35 | # Initialize random-upload-times.json and random-waits.json 36 | initialize_json_file('random-upload-times.json', default=[]) 37 | initialize_json_file('random-waits.json', default=[]) 38 | 39 | config = load_config() 40 | logging.info("Loaded configuration") 41 | 42 | INSTAGRAM_USERNAME, INSTAGRAM_PASSWORD = decrypt_credentials(config) 43 | logging.info("Decrypted Instagram credentials") 44 | 45 | cl = Client() 46 | 47 | login(cl, INSTAGRAM_USERNAME, INSTAGRAM_PASSWORD, 'session.json') 48 | logging.info("Logged in to Instagram") 49 | 50 | def main(): 51 | status = read_status() 52 | logging.info("Read initial status") 53 | 54 | uploaded_reels = load_uploaded_reels('upload_log.txt') 55 | logging.info(f"Loaded uploaded reels: {len(uploaded_reels)} reels") 56 | 57 | tags = config.get('custom_tags', []) 58 | 59 | while True: 60 | current_time = time() 61 | logging.debug(f"Current time: {current_time}") 62 | 63 | last_scrape_time = status.get('last_scrape_time', 0) or 0 64 | last_upload_time = status.get('last_upload_time', 0) or 0 65 | logging.debug(f"Last scrape time: {last_scrape_time}, Last upload time: {last_upload_time}") 66 | 67 | # Scraping logic 68 | if (current_time - last_scrape_time) >= 60 * 60: 69 | if config['scraping']['enabled']: 70 | for profile in config['scraping']['profiles'].split(): 71 | logging.info(f"Scraping profile: {profile}") 72 | scraped_reels = scrape_reels(cl, profile, config['scraping']['num_reels'], last_scrape_time, uploaded_reels, status['reels_scraped'], tags) 73 | status['reels_scraped'].extend(scraped_reels) 74 | update_status(last_scrape_time=current_time, reels_scraped=status['reels_scraped']) 75 | logging.info("Updated status after scraping") 76 | console.print("[bold navy_blue]Finished scraping reels from profiles[/bold navy_blue]") 77 | console.print("[bold navy_blue]Displaying dashboard before waiting phase[/bold navy_blue]") 78 | subprocess.run(["python", "dashboard.py"]) 79 | 80 | # Randomly perform human-like actions 81 | if random.random() < 0.5: 82 | perform_human_actions(cl, tags) 83 | wait_time = random_sleep(60, 90, action="uploading phase") 84 | console.print(f"[bold navy_blue]Waited for {wait_time:.2f} seconds before moving to the uploading phase[/bold navy_blue]") 85 | sleep_with_progress_bar(wait_time) 86 | 87 | # Uploading logic 88 | if (current_time - last_upload_time) >= config['uploading']['upload_interval_minutes'] * 60: 89 | if config['uploading']['enabled']: 90 | console.print("[bold purple4]Starting upload process[/bold purple4]") 91 | unuploaded_reels = get_unuploaded_reels('downloads', status['reels_scraped'], uploaded_reels) 92 | if not unuploaded_reels: 93 | console.print("[bold purple4]No new reels to upload, initiating scraping protocol.[/bold purple4]") 94 | for profile in config['scraping']['profiles'].split(): 95 | logging.info(f"Scraping profile: {profile}") 96 | scraped_reels = scrape_reels(cl, profile, config['scraping']['num_reels'], last_scrape_time, uploaded_reels, status['reels_scraped'], tags) 97 | status['reels_scraped'].extend(scraped_reels) 98 | update_status(last_scrape_time=current_time, reels_scraped=status['reels_scraped']) 99 | logging.info("Updated status after scraping") 100 | console.print("[bold purple4]Finished scraping reels from profiles[/bold purple4]") 101 | console.print("[bold purple4]Displaying dashboard before waiting phase[/bold purple4]") 102 | subprocess.run(["python", "dashboard.py"]) 103 | else: 104 | upload_reels_with_new_descriptions(cl, config, unuploaded_reels, uploaded_reels, 'upload_log.txt') 105 | update_status(last_upload_time=current_time) 106 | console.print("[bold purple4]Finished uploading reels[/bold purple4]") 107 | 108 | # Randomly perform human-like actions 109 | if random.random() < 0.5: 110 | perform_human_actions(cl, tags) 111 | 112 | console.print("[bold purple4]Displaying dashboard before waiting phase[/bold purple4]") 113 | subprocess.run(["python", "dashboard.py"]) 114 | 115 | # Randomly perform human-like actions during the waiting period 116 | if random.random() < 0.5: 117 | perform_human_actions(cl, tags) 118 | 119 | # Delete old reels based on the deletion interval 120 | delete_old_reels(config['deleting']['delete_interval_minutes']) 121 | 122 | sleep_with_progress_bar(60) 123 | logging.debug("Sleeping for 60 seconds before next iteration") 124 | 125 | if __name__ == "__main__": 126 | main() 127 | -------------------------------------------------------------------------------- /Historic/Version 2 - 72024/utils.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import random 4 | import logging 5 | from rich.console import Console 6 | from datetime import datetime 7 | from time import sleep 8 | 9 | console = Console() 10 | 11 | def random_sleep(min_time=5, max_time=30, action="", profile_reel_id=""): 12 | sleep_time = random.uniform(min_time, max_time) 13 | logging.info(f"Sleeping for {sleep_time:.2f} seconds before {action}.") 14 | log_random_waits(sleep_time, profile_reel_id) 15 | return sleep_time 16 | 17 | def log_random_waits(sleep_time, profile_reel_id): 18 | random_waits_file = 'random-waits.json' 19 | initialize_json_file(random_waits_file, default=[]) 20 | with open(random_waits_file, 'r') as f: 21 | random_waits = json.load(f) 22 | random_waits.append({'time': sleep_time, 'profile_reel_id': profile_reel_id}) 23 | with open(random_waits_file, 'w') as f: 24 | json.dump(random_waits, f) 25 | console.print(f"[bold green]Logged random wait: {sleep_time:.2f} seconds for {profile_reel_id}[/bold green]") 26 | 27 | def log_random_upload_times(sleep_time, profile_reel_id): 28 | random_upload_time_file = 'random-upload-times.json' 29 | initialize_json_file(random_upload_time_file, default=[]) 30 | with open(random_upload_time_file, 'r') as f: 31 | random_times = json.load(f) 32 | random_times.append({'time': sleep_time, 'profile_reel_id': profile_reel_id}) 33 | with open(random_upload_time_file, 'w') as f: 34 | json.dump(random_times, f) 35 | console.print(f"[bold green]Logged random upload time: {sleep_time:.2f} seconds for {profile_reel_id}[/bold green]") 36 | 37 | def initialize_json_file(file_path, default): 38 | if not os.path.exists(file_path): 39 | with open(file_path, 'w') as f: 40 | json.dump(default, f) 41 | console.print(f"[bold green]Created new JSON file: {file_path}[/bold green]") 42 | 43 | def update_status(**kwargs): 44 | status_file = 'status.json' 45 | status = read_status() 46 | status.update(kwargs) 47 | with open(status_file, 'w') as f: 48 | json.dump(status, f, indent=4, default=str) 49 | console.print("[bold green]Updated status file.[/bold green]") 50 | 51 | def read_status(): 52 | status_file = 'status.json' 53 | default_status = { 54 | "last_scrape_time": 0, 55 | "next_scrape_time": 0, 56 | "reels_scraped": [], 57 | "last_upload_time": 0, 58 | "next_upload_time": 0, 59 | "last_story_upload_time": 0, 60 | "next_story_upload_time": 0, 61 | "last_delete_time": 0, 62 | "random_upload_times": [], 63 | "random_waits": [], 64 | "next_file_to_upload": "N/A", 65 | "reels_uploaded": [] 66 | } 67 | if os.path.exists(status_file): 68 | with open(status_file, 'r') as f: 69 | status = json.load(f) 70 | for key in ["last_scrape_time", "next_scrape_time", "last_upload_time", "next_upload_time", "last_story_upload_time", "next_story_upload_time", "last_delete_time"]: 71 | if status[key] is None: 72 | status[key] = 0 73 | elif isinstance(status[key], str): 74 | status[key] = datetime.strptime(status[key], "%Y-%m-%d %H:%M:%S.%f").timestamp() 75 | console.print("[bold green]Loaded existing status file.[/bold green]") 76 | return status 77 | console.print("[bold yellow]No existing status file found, using default status.[/bold yellow]") 78 | return default_status 79 | 80 | def initialize_status_file(): 81 | status_file = 'status.json' 82 | if not os.path.exists(status_file): 83 | default_status = { 84 | "last_scrape_time": 0, 85 | "next_scrape_time": 0, 86 | "reels_scraped": [], 87 | "last_upload_time": 0, 88 | "next_upload_time": 0, 89 | "last_story_upload_time": 0, 90 | "next_story_upload_time": 0, 91 | "last_delete_time": 0, 92 | "random_upload_times": [], 93 | "random_waits": [], 94 | "next_file_to_upload": "N/A", 95 | "reels_uploaded": [] 96 | } 97 | with open(status_file, 'w') as f: 98 | json.dump(default_status, f, indent=4, default=str) 99 | console.print("[bold green]Initialized new status file.[/bold green]") 100 | 101 | def sleep_with_progress_bar(duration): 102 | from tqdm import tqdm 103 | console.print(f"[bold blue]Sleeping for {duration} seconds.[/bold blue]") 104 | for _ in tqdm(range(int(duration)), desc="Sleeping", unit="s"): 105 | sleep(1) 106 | console.print("[bold blue]Finished sleeping.[/bold blue]") 107 | 108 | def delete_old_reels(delete_interval_minutes): 109 | status = read_status() 110 | last_delete_time = status.get('last_delete_time', 0) or 0 111 | current_time = datetime.now().timestamp() 112 | 113 | if (current_time - last_delete_time) >= delete_interval_minutes * 60: 114 | console.print("[bold blue]Starting the deletion process...[/bold blue]") 115 | delete_uploaded_files() 116 | console.print("[bold blue]Deletion process completed.[/bold blue]") 117 | 118 | def delete_uploaded_files(): 119 | upload_log = read_upload_log() 120 | if not upload_log: 121 | console.print("[bold yellow]No files to delete.[/bold yellow]") 122 | return 123 | 124 | deleted_files = [] 125 | for log_entry in upload_log: 126 | file_prefix = log_entry 127 | for extension in ['.mp4', '.txt', '.mp4.jpg']: 128 | file_path = os.path.join('downloads', file_prefix + extension) 129 | if os.path.exists(file_path): 130 | os.remove(file_path) 131 | deleted_files.append(file_path) 132 | console.print(f"[bold green]Deleted file:[/bold green] {file_path}") 133 | 134 | if deleted_files: 135 | update_status(last_delete_time=datetime.now().timestamp()) 136 | console.print(f"[bold green]Updated status with last delete time: {datetime.now()}[/bold green]") 137 | else: 138 | console.print("[bold yellow]No matching files found to delete.[/bold yellow]") 139 | 140 | def read_upload_log(): 141 | log_file = 'upload_log.txt' 142 | if not os.path.exists(log_file): 143 | console.print("[bold red]Upload log file not found.[/bold red]") 144 | return [] 145 | with open(log_file, 'r') as f: 146 | uploads = f.readlines() 147 | return [upload.strip() for upload in uploads] 148 | -------------------------------------------------------------------------------- /Historic/Version 2.2 - 7282024/utils.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import random 4 | import logging 5 | from rich.console import Console 6 | from datetime import datetime 7 | from time import sleep 8 | 9 | console = Console() 10 | 11 | def random_sleep(min_time=5, max_time=30, action="", profile_reel_id=""): 12 | sleep_time = random.uniform(min_time, max_time) 13 | logging.info(f"Sleeping for {sleep_time:.2f} seconds before {action}.") 14 | log_random_waits(sleep_time, profile_reel_id) 15 | return sleep_time 16 | 17 | def log_random_waits(sleep_time, profile_reel_id): 18 | random_waits_file = 'random-waits.json' 19 | initialize_json_file(random_waits_file, default=[]) 20 | with open(random_waits_file, 'r') as f: 21 | random_waits = json.load(f) 22 | random_waits.append({'time': sleep_time, 'profile_reel_id': profile_reel_id}) 23 | with open(random_waits_file, 'w') as f: 24 | json.dump(random_waits, f) 25 | console.print(f"[bold green]Logged random wait: {sleep_time:.2f} seconds for {profile_reel_id}[/bold green]") 26 | 27 | def log_random_upload_times(sleep_time, profile_reel_id): 28 | random_upload_time_file = 'random-upload-times.json' 29 | initialize_json_file(random_upload_time_file, default=[]) 30 | with open(random_upload_time_file, 'r') as f: 31 | random_times = json.load(f) 32 | random_times.append({'time': sleep_time, 'profile_reel_id': profile_reel_id}) 33 | with open(random_upload_time_file, 'w') as f: 34 | json.dump(random_times, f) 35 | console.print(f"[bold green]Logged random upload time: {sleep_time:.2f} seconds for {profile_reel_id}[/bold green]") 36 | 37 | def initialize_json_file(file_path, default): 38 | if not os.path.exists(file_path): 39 | with open(file_path, 'w') as f: 40 | json.dump(default, f) 41 | console.print(f"[bold green]Created new JSON file: {file_path}[/bold green]") 42 | 43 | def update_status(**kwargs): 44 | status_file = 'status.json' 45 | status = read_status() 46 | status.update(kwargs) 47 | with open(status_file, 'w') as f: 48 | json.dump(status, f, indent=4, default=str) 49 | console.print("[bold green]Updated status file.[/bold green]") 50 | 51 | def read_status(): 52 | status_file = 'status.json' 53 | default_status = { 54 | "last_scrape_time": 0, 55 | "next_scrape_time": 0, 56 | "reels_scraped": [], 57 | "last_upload_time": 0, 58 | "next_upload_time": 0, 59 | "last_story_upload_time": 0, 60 | "next_story_upload_time": 0, 61 | "last_delete_time": 0, 62 | "random_upload_times": [], 63 | "random_waits": [], 64 | "next_file_to_upload": "N/A", 65 | "reels_uploaded": [] 66 | } 67 | if os.path.exists(status_file): 68 | with open(status_file, 'r') as f: 69 | status = json.load(f) 70 | for key in ["last_scrape_time", "next_scrape_time", "last_upload_time", "next_upload_time", "last_story_upload_time", "next_story_upload_time", "last_delete_time"]: 71 | if status[key] is None: 72 | status[key] = 0 73 | elif isinstance(status[key], str): 74 | status[key] = datetime.strptime(status[key], "%Y-%m-%d %H:%M:%S.%f").timestamp() 75 | console.print("[bold green]Loaded existing status file.[/bold green]") 76 | return status 77 | console.print("[bold yellow]No existing status file found, using default status.[/bold yellow]") 78 | return default_status 79 | 80 | def initialize_status_file(): 81 | status_file = 'status.json' 82 | if not os.path.exists(status_file): 83 | default_status = { 84 | "last_scrape_time": 0, 85 | "next_scrape_time": 0, 86 | "reels_scraped": [], 87 | "last_upload_time": 0, 88 | "next_upload_time": 0, 89 | "last_story_upload_time": 0, 90 | "next_story_upload_time": 0, 91 | "last_delete_time": 0, 92 | "random_upload_times": [], 93 | "random_waits": [], 94 | "next_file_to_upload": "N/A", 95 | "reels_uploaded": [] 96 | } 97 | with open(status_file, 'w') as f: 98 | json.dump(default_status, f, indent=4, default=str) 99 | console.print("[bold green]Initialized new status file.[/bold green]") 100 | 101 | def sleep_with_progress_bar(duration): 102 | from tqdm import tqdm 103 | console.print(f"[bold blue]Sleeping for {duration} seconds.[/bold blue]") 104 | for _ in tqdm(range(int(duration)), desc="Sleeping", unit="s"): 105 | sleep(1) 106 | console.print("[bold blue]Finished sleeping.[/bold blue]") 107 | 108 | def delete_old_reels(delete_interval_minutes): 109 | status = read_status() 110 | last_delete_time = status.get('last_delete_time', 0) or 0 111 | current_time = datetime.now().timestamp() 112 | 113 | if (current_time - last_delete_time) >= delete_interval_minutes * 60: 114 | console.print("[bold blue]Starting the deletion process...[/bold blue]") 115 | delete_uploaded_files() 116 | console.print("[bold blue]Deletion process completed.[/bold blue]") 117 | 118 | def delete_uploaded_files(): 119 | upload_log = read_upload_log() 120 | if not upload_log: 121 | console.print("[bold yellow]No files to delete.[/bold yellow]") 122 | return 123 | 124 | deleted_files = [] 125 | for log_entry in upload_log: 126 | file_prefix = log_entry 127 | for extension in ['.mp4', '.txt', '.mp4.jpg']: 128 | file_path = os.path.join('downloads', file_prefix + extension) 129 | if os.path.exists(file_path): 130 | os.remove(file_path) 131 | deleted_files.append(file_path) 132 | console.print(f"[bold green]Deleted file:[/bold green] {file_path}") 133 | 134 | if deleted_files: 135 | update_status(last_delete_time=datetime.now().timestamp()) 136 | console.print(f"[bold green]Updated status with last delete time: {datetime.now()}[/bold green]") 137 | else: 138 | console.print("[bold yellow]No matching files found to delete.[/bold yellow]") 139 | 140 | def read_upload_log(): 141 | log_file = 'upload_log.txt' 142 | if not os.path.exists(log_file): 143 | console.print("[bold red]Upload log file not found.[/bold red]") 144 | return [] 145 | with open(log_file, 'r') as f: 146 | uploads = f.readlines() 147 | return [upload.strip() for upload in uploads] 148 | -------------------------------------------------------------------------------- /2FA_DEV/config_setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | import getpass 3 | import yaml 4 | from cryptography.fernet import Fernet 5 | from instagrapi import Client 6 | from auth import perform_login, encrypt_credentials, generate_key, save_session, load_session 7 | from input_helpers import get_input, get_boolean_input 8 | from rich.console import Console 9 | 10 | SESSION_DIR = 'user_sessions' 11 | CONFIG_FILE = 'config.yaml' 12 | console = Console() 13 | 14 | # Ensure the session directory exists 15 | if not os.path.exists(SESSION_DIR): 16 | os.makedirs(SESSION_DIR) 17 | console.print(f"[bold green]Created directory for user sessions: {SESSION_DIR}[/bold green]") 18 | 19 | DEFAULT_TAGS = [ 20 | 'instagram', 'instadaily', 'LikeForLike', 'FollowForFollow', 'viral', 21 | 'trending', 'explorepage', 'love', 'photooftheday', 'instagood', 22 | 'fashion', 'style', 'beauty', 'art', 'instamood', 'explore', 23 | 'photography', 'travel', 'nature', 'happy', 'fun', 'picoftheday', 24 | 'instalike', 'motivation', 'fitness', 'selfie', 'cute', 'food', 25 | 'instafashion', 'lifestyle', 'smile', 'memes', 'dankmemes', 26 | 'funnymemes', 'memestagram', 'funny', 'comedy', 'meme', 27 | 'ootd', 'life', 'friends', 'summer', 'bhfyp', 'instaphoto', 28 | 'inspiration', 'music', 'family', 'weekendvibes', 'sunset', 29 | 'wanderlust', 'model', 'india', 'usa', 'goals' 30 | ] 31 | 32 | def get_user_credentials(): 33 | """Prompt the user for Instagram credentials and return them.""" 34 | while True: 35 | username = input('Enter Instagram username: ').encode() 36 | password = getpass.getpass('Enter Instagram password: ').encode() 37 | client = Client() 38 | session_file = os.path.join(SESSION_DIR, f"{username.decode()}_session.json") 39 | client.delay_range = [1, 3] # Mimic human behavior with delays between requests 40 | 41 | # Attempt to login 42 | if perform_login(client, username.decode(), password.decode(), session_file): 43 | console.print("[bold green]Login successful![/bold green]") 44 | return username, password, client.two_factor_auth_required 45 | else: 46 | console.print("[bold red]Login failed. Please try again.[/bold red]") 47 | 48 | def create_scraping_config(): 49 | """Create scraping configuration.""" 50 | return { 51 | 'enabled': get_boolean_input('Enable scraping? (true/false): '), 52 | 'profiles': input('Enter profiles to scrape (space separated): '), 53 | 'num_reels': get_input('Number of reels to scrape per profile: ', int), 54 | 'scrape_interval_minutes': get_input('Interval between scrapes (minutes): ', int), 55 | 'like_reels': get_boolean_input('Like scraped videos? (true/false): ') 56 | } 57 | 58 | def create_uploading_config(): 59 | """Create uploading configuration.""" 60 | return { 61 | 'enabled': get_boolean_input('Enable uploading? (true/false): '), 62 | 'upload_interval_minutes': get_input('Interval between uploads (minutes): ', int), 63 | 'add_to_story': get_boolean_input('Add to story? (true/false): ') 64 | } 65 | 66 | def create_description_config(): 67 | """Create description and hashtag configuration.""" 68 | use_original_description = get_boolean_input('Use original description? (true/false): ') 69 | description_config = {'use_original': use_original_description} 70 | 71 | if use_original_description: 72 | description_config['hashtags'] = { 73 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 74 | } 75 | if description_config['hashtags']['use_hashtags']: 76 | description_config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 77 | 78 | description_config['credit'] = { 79 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 80 | } 81 | else: 82 | description_config['custom_description'] = input('Enter custom description (leave blank to use default descriptions): ') 83 | 84 | description_config['hashtags'] = { 85 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 86 | } 87 | if description_config['hashtags']['use_hashtags']: 88 | description_config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 89 | 90 | description_config['credit'] = { 91 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 92 | } 93 | 94 | return description_config 95 | 96 | def create_config(encrypted_username, encrypted_password, key): 97 | """Create the main configuration dictionary.""" 98 | config = { 99 | 'instagram': { 100 | 'username': encrypted_username, 101 | 'password': encrypted_password, 102 | 'original_username': encrypted_username 103 | }, 104 | 'key': key.decode(), 105 | 'scraping': create_scraping_config(), 106 | 'uploading': create_uploading_config(), 107 | 'proxy': input('Enter proxy server address (leave blank if not using proxy): '), 108 | 'description': create_description_config(), 109 | 'leave_comment': get_boolean_input('Leave comment on scraped videos? (true/false): '), 110 | 'deleting': { 111 | 'delete_interval_minutes': get_input('Interval between deletions (minutes): ', int) 112 | }, 113 | 'custom_tags': input(f'Enter custom tags (space separated, leave blank for default: {DEFAULT_TAGS}): ').split() or DEFAULT_TAGS 114 | } 115 | 116 | if config['leave_comment']: 117 | config['comments'] = input('Enter comments (comma separated): ').split(',') 118 | 119 | return config 120 | 121 | def save_config(config, filename=CONFIG_FILE): 122 | """Save the configuration dictionary to a YAML file.""" 123 | with open(filename, 'w') as file: 124 | yaml.dump(config, file) 125 | console.print(f"[bold green]Configuration saved to {filename}[/bold green]") 126 | 127 | def main(): 128 | key = generate_key() 129 | username, password, two_fa_enabled = get_user_credentials() 130 | 131 | encrypted_username, encrypted_password = encrypt_credentials(username.decode(), password.decode(), key) 132 | 133 | config = create_config(encrypted_username, encrypted_password, key) 134 | config['instagram']['original_username'] = username.decode() # Add original username to config 135 | save_config(config) 136 | 137 | if __name__ == "__main__": 138 | main() 139 | -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/dashboard.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | def display_version_info(): 4 | try: 5 | with open('version.txt', 'r') as f: 6 | version_info = json.load(f) 7 | 8 | print("="*80) 9 | print(f"Created by: {version_info['created_by']}") 10 | print(f"Program: {version_info['program_name']}") 11 | print(f"Version: {version_info['version']}") 12 | print(f"Working as of: {version_info['working_as_of']}") 13 | print("="*80) 14 | except (FileNotFoundError, KeyError): 15 | print("="*80) 16 | print("Created by: Sujay1599") 17 | print("Program: InstgramTheftyScraperPosterHuman") 18 | print("Version: Unknown version") 19 | print("Working as of: Unknown date") 20 | print("="*80) 21 | 22 | 23 | import os 24 | import json 25 | from rich.console import Console 26 | from rich.table import Table 27 | from datetime import datetime 28 | 29 | 30 | status_file = 'status.json' 31 | log_file = 'upload_log.txt' 32 | random_upload_time_file = 'random-upload-times.json' 33 | random_waits_file = 'random-waits.json' 34 | downloads_dir = 'downloads' 35 | console = Console() 36 | 37 | def read_json_file(file_path): 38 | if not os.path.exists(file_path): 39 | console.print(f"[bold red]{file_path} not found.[/bold red]") 40 | return {} 41 | try: 42 | with open(file_path, 'r') as file: 43 | return json.load(file) 44 | except json.JSONDecodeError as e: 45 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 46 | return {} 47 | 48 | def read_text_file(file_path): 49 | if not os.path.exists(file_path): 50 | console.print(f"[bold red]{file_path} not found.[/bold red]") 51 | return [] 52 | try: 53 | with open(file_path, 'r') as file: 54 | return [line.strip() for line in file] 55 | except Exception as e: 56 | console.print(f"[bold red]Error reading {file_path}: {e}[/bold red]") 57 | return [] 58 | 59 | def get_file_counts(): 60 | if not os.path.exists(downloads_dir): 61 | console.print("[bold red]Downloads directory not found.[/bold red]") 62 | return 0, [], 0, 0 63 | total_files = [f for f in os.listdir(downloads_dir) if f.endswith('.mp4')] 64 | uploaded_files = read_text_file(log_file) 65 | uploaded_files_set = set(uploaded_files) 66 | unuploaded_files = [f for f in total_files if f not in uploaded_files_set] 67 | folder_size = sum(os.path.getsize(os.path.join(downloads_dir, f)) for f in total_files) / (1024 * 1024) 68 | return len(total_files), uploaded_files, len(unuploaded_files), folder_size 69 | 70 | def format_time(timestamp): 71 | if not timestamp or timestamp == 'None': 72 | return "N/A" 73 | try: 74 | return datetime.fromtimestamp(float(timestamp)).strftime('%Y-%m-%d %H:%M:%S') 75 | except (ValueError, TypeError): 76 | return "Invalid timestamp" 77 | 78 | def display_dashboard(): 79 | status = read_json_file(status_file) 80 | if not status: 81 | return 82 | 83 | uploads = read_text_file(log_file) 84 | random_upload_times = read_json_file(random_upload_time_file) 85 | random_waits = read_json_file(random_waits_file) 86 | total_files, uploaded_files, unuploaded_files, folder_size = get_file_counts() 87 | 88 | console.print("=" * 80, justify="left") 89 | console.print("[bold yellow]Instagram Thefty Poster Dashboard[/bold yellow]", justify="left") 90 | console.print("=" * 80, justify="left") 91 | 92 | table = Table(show_header=True, header_style="bold magenta") 93 | table.add_column("Scrape Status", justify="center") 94 | table.add_column("Upload Status", justify="center") 95 | 96 | table.add_row( 97 | f"Last Scrape Time: {format_time(status.get('last_scrape_time'))}\nNext Scrape Time: {format_time(status.get('next_scrape_time'))}", 98 | f"Last Upload Time: {format_time(status.get('last_upload_time'))}\nNext Upload Time: {format_time(status.get('next_upload_time'))}" 99 | ) 100 | console.print(table) 101 | 102 | file_table = Table(show_header=True, header_style="bold magenta") 103 | file_table.add_column("Metric", justify="center") 104 | file_table.add_column("Value", justify="center") 105 | 106 | file_table.add_row("Total .mp4 Files", str(total_files)) 107 | file_table.add_row("Uploaded .mp4 Files", str(len(uploaded_files))) 108 | file_table.add_row("Unuploaded .mp4 Files", str(unuploaded_files)) 109 | file_table.add_row("Downloads Folder Size (MB)", f"{folder_size:.2f}") 110 | 111 | console.print(file_table) 112 | 113 | console.print("[bold]Last 10 Uploads[/bold]") 114 | for upload in uploads[-10:]: 115 | console.print(f"- {upload}") 116 | 117 | console.print("[bold]Reels Scraped[/bold]") 118 | for reel in status.get('reels_scraped', []): 119 | console.print(f"- {reel}") 120 | 121 | console.print("[bold]Random Upload Times[/bold]") 122 | for item in random_upload_times[-10:]: 123 | if isinstance(item, dict): 124 | time_record = item.get('time', 'N/A') 125 | profile_reel_id = item.get('profile_reel_id', 'N/A') 126 | console.print(f"- {time_record} seconds for {profile_reel_id}") 127 | else: 128 | console.print(f"- {item}") 129 | 130 | console.print("[bold]Random Wait Times[/bold]") 131 | for item in random_waits[-10:]: 132 | if isinstance(item, dict): 133 | time_record = item.get('time', 'N/A') 134 | profile_reel_id = item.get('profile_reel_id', 'N/A') 135 | console.print(f"- {time_record} seconds for {profile_reel_id}") 136 | else: 137 | console.print(f"- {item}") 138 | 139 | table2 = Table(show_header=True, header_style="bold magenta") 140 | table2.add_column("Story Upload Status", justify="center") 141 | table2.add_column("Deletion Status", justify="center") 142 | 143 | table2.add_row( 144 | f"Last Story Upload Time: {format_time(status.get('last_story_upload_time'))}\nNext Story Upload Time: {format_time(status.get('next_story_upload_time'))}", 145 | f"Last Deletion Time: {format_time(status.get('last_delete_time'))}\nNext Deletion Time: {format_time(status.get('next_deletion_time'))}" 146 | ) 147 | console.print(table2) 148 | 149 | next_file = status.get('next_file_to_upload', 'N/A') 150 | console.print(f"[bold]Next File to Upload:[/bold] {next_file}") 151 | 152 | if __name__ == "__main__": 153 | display_dashboard() 154 | -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/2FA_DEV/config_setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | import getpass 3 | import yaml 4 | from cryptography.fernet import Fernet 5 | from instagrapi import Client 6 | from auth import perform_login, encrypt_credentials, generate_key, save_session, load_session 7 | from input_helpers import get_input, get_boolean_input 8 | from rich.console import Console 9 | 10 | SESSION_DIR = 'user_sessions' 11 | CONFIG_FILE = 'config.yaml' 12 | console = Console() 13 | 14 | # Ensure the session directory exists 15 | if not os.path.exists(SESSION_DIR): 16 | os.makedirs(SESSION_DIR) 17 | console.print(f"[bold green]Created directory for user sessions: {SESSION_DIR}[/bold green]") 18 | 19 | DEFAULT_TAGS = [ 20 | 'instagram', 'instadaily', 'LikeForLike', 'FollowForFollow', 'viral', 21 | 'trending', 'explorepage', 'love', 'photooftheday', 'instagood', 22 | 'fashion', 'style', 'beauty', 'art', 'instamood', 'explore', 23 | 'photography', 'travel', 'nature', 'happy', 'fun', 'picoftheday', 24 | 'instalike', 'motivation', 'fitness', 'selfie', 'cute', 'food', 25 | 'instafashion', 'lifestyle', 'smile', 'memes', 'dankmemes', 26 | 'funnymemes', 'memestagram', 'funny', 'comedy', 'meme', 27 | 'ootd', 'life', 'friends', 'summer', 'bhfyp', 'instaphoto', 28 | 'inspiration', 'music', 'family', 'weekendvibes', 'sunset', 29 | 'wanderlust', 'model', 'india', 'usa', 'goals' 30 | ] 31 | 32 | def get_user_credentials(): 33 | """Prompt the user for Instagram credentials and return them.""" 34 | while True: 35 | username = input('Enter Instagram username: ').encode() 36 | password = getpass.getpass('Enter Instagram password: ').encode() 37 | client = Client() 38 | session_file = os.path.join(SESSION_DIR, f"{username.decode()}_session.json") 39 | client.delay_range = [1, 3] # Mimic human behavior with delays between requests 40 | 41 | # Attempt to login 42 | if perform_login(client, username.decode(), password.decode(), session_file): 43 | console.print("[bold green]Login successful![/bold green]") 44 | return username, password, client.two_factor_auth_required 45 | else: 46 | console.print("[bold red]Login failed. Please try again.[/bold red]") 47 | 48 | def create_scraping_config(): 49 | """Create scraping configuration.""" 50 | return { 51 | 'enabled': get_boolean_input('Enable scraping? (true/false): '), 52 | 'profiles': input('Enter profiles to scrape (space separated): '), 53 | 'num_reels': get_input('Number of reels to scrape per profile: ', int), 54 | 'scrape_interval_minutes': get_input('Interval between scrapes (minutes): ', int), 55 | 'like_reels': get_boolean_input('Like scraped videos? (true/false): ') 56 | } 57 | 58 | def create_uploading_config(): 59 | """Create uploading configuration.""" 60 | return { 61 | 'enabled': get_boolean_input('Enable uploading? (true/false): '), 62 | 'upload_interval_minutes': get_input('Interval between uploads (minutes): ', int), 63 | 'add_to_story': get_boolean_input('Add to story? (true/false): ') 64 | } 65 | 66 | def create_description_config(): 67 | """Create description and hashtag configuration.""" 68 | use_original_description = get_boolean_input('Use original description? (true/false): ') 69 | description_config = {'use_original': use_original_description} 70 | 71 | if use_original_description: 72 | description_config['hashtags'] = { 73 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 74 | } 75 | if description_config['hashtags']['use_hashtags']: 76 | description_config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 77 | 78 | description_config['credit'] = { 79 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 80 | } 81 | else: 82 | description_config['custom_description'] = input('Enter custom description (leave blank to use default descriptions): ') 83 | 84 | description_config['hashtags'] = { 85 | 'use_hashtags': get_boolean_input('Add hashtags? (true/false): ') 86 | } 87 | if description_config['hashtags']['use_hashtags']: 88 | description_config['hashtags']['hashtags_list'] = input('Enter hashtags (space separated, leave blank for default): ') 89 | 90 | description_config['credit'] = { 91 | 'give_credit': get_boolean_input('Give credit? (true/false): ') 92 | } 93 | 94 | return description_config 95 | 96 | def create_config(encrypted_username, encrypted_password, key): 97 | """Create the main configuration dictionary.""" 98 | config = { 99 | 'instagram': { 100 | 'username': encrypted_username, 101 | 'password': encrypted_password, 102 | 'original_username': encrypted_username 103 | }, 104 | 'key': key.decode(), 105 | 'scraping': create_scraping_config(), 106 | 'uploading': create_uploading_config(), 107 | 'proxy': input('Enter proxy server address (leave blank if not using proxy): '), 108 | 'description': create_description_config(), 109 | 'leave_comment': get_boolean_input('Leave comment on scraped videos? (true/false): '), 110 | 'deleting': { 111 | 'delete_interval_minutes': get_input('Interval between deletions (minutes): ', int) 112 | }, 113 | 'custom_tags': input(f'Enter custom tags (space separated, leave blank for default: {DEFAULT_TAGS}): ').split() or DEFAULT_TAGS 114 | } 115 | 116 | if config['leave_comment']: 117 | config['comments'] = input('Enter comments (comma separated): ').split(',') 118 | 119 | return config 120 | 121 | def save_config(config, filename=CONFIG_FILE): 122 | """Save the configuration dictionary to a YAML file.""" 123 | with open(filename, 'w') as file: 124 | yaml.dump(config, file) 125 | console.print(f"[bold green]Configuration saved to {filename}[/bold green]") 126 | 127 | def main(): 128 | key = generate_key() 129 | username, password, two_fa_enabled = get_user_credentials() 130 | 131 | encrypted_username, encrypted_password = encrypt_credentials(username.decode(), password.decode(), key) 132 | 133 | config = create_config(encrypted_username, encrypted_password, key) 134 | config['instagram']['original_username'] = username.decode() # Add original username to config 135 | save_config(config) 136 | 137 | if __name__ == "__main__": 138 | main() 139 | -------------------------------------------------------------------------------- /Historic/Version 3.1.1 (2)/default_descriptions.py: -------------------------------------------------------------------------------- 1 | # default_descriptions.py 2 | 3 | 4 | 5 | DEFAULT_DESCRIPTIONS = [ 6 | """ 7 | The 2021 Honda Civic is a reliable compact car 🚗 known for its fuel efficiency and practicality. It typically comes with a 2.0-liter four-cylinder engine or an optional 1.5-liter turbocharged engine, offering a good balance of power and efficiency. 8 | 9 | The standard engine produces around 158 horsepower, while the turbocharged one boosts it up to 174 horsepower. The top speed of the Civic varies depending on the engine and trim level, but it generally ranges from 115 to 130 mph. The 0-60 mph acceleration time for the Civic is approximately 7-8 seconds, depending on the engine choice. 10 | 11 | Inside, the Civic boasts a comfortable and well-equipped cabin with plenty of standard and available features. These include a user-friendly infotainment system with smartphone integration, advanced safety features like Honda Sensing, and a spacious interior with ample legroom and cargo space. 12 | 13 | Overall, the 2021 Honda Civic offers a blend of reliability, efficiency, and practicality that appeals to a wide range of drivers. 14 | 15 | """, 16 | 17 | """No problem! Here’s the information about the Mercedes CLR GTR: 18 | RUN AROUND 10-5 MILES 19 | 20 | The Mercedes CLR GTR is a remarkable racing car celebrated for its outstanding performance and sleek design. Powered by a potent 6.0-liter V12 engine, it delivers over 600 horsepower. 21 | 22 | Acceleration from 0 to 100 km/h takes approximately 3.7 seconds, with a remarkable top speed surpassing 320 km/ h. 23 | 24 | Incorporating advanced aerodynamic features and cutting-edge stability technologies, the CLR GTR ensures exceptional stability and control, particularly 25 | during high-speed maneuvers. 26 | 27 | Originally priced around $1.5 million, the Mercedes CLR GTR is considered one of the most exclusive and prestigious racing cars ever produced. 28 | """, 29 | """Here's a classic chocolate chip cookie recipe: 30 | 31 | Ingredients: 32 | - 1 cup (2 sticks) unsalted butter, softened 33 | - 3/4 cup granulated sugar 34 | - 3/4 cup packed brown sugar 35 | - 2 large eggs 36 | - 1 teaspoon vanilla extract 37 | - 2 1/4 cups all-purpose flour 38 | - 1 teaspoon baking soda 39 | - 1/2 teaspoon salt 40 | - 2 cups semisweet chocolate chips 41 | 42 | Instructions: 43 | 1. Preheat your oven to 375°F (190°C). Line baking sheets with parchment paper. 44 | 2. In a large mixing bowl, cream together the butter, granulated sugar, and brown sugar until light and fluffy. 45 | 3. Beat in the eggs, one at a time, then stir in the vanilla extract. 46 | 4. In a separate bowl, combine the flour, baking soda, and salt. Gradually add the dry ingredients to the wet ingredients and mix until well combined. 47 | 5. Fold in the chocolate chips until evenly distributed throughout the dough. 48 | 6. Drop rounded tablespoons of dough onto the prepared baking sheets, leaving space between each cookie. 49 | 7. Bake in the preheated oven for 8 to 10 minutes, or until the edges are golden brown. 50 | 8. Allow the cookies to cool on the baking sheets for a few minutes before transferring them to wire racks to cool completely. 51 | 52 | Enjoy your delicious homemade chocolate chip cookies!""", 53 | """ 54 | No problem! Here's the information about the Mercedes CLR GTR: 55 | 56 | The Mercedes CLR GTR is a remarkable racing car celebrated for its outstanding performance and sleek design. Powered by a potent 6.0-liter V12 engine, it delivers over 600 horsepower. 57 | 58 | 🔧 59 | 60 | Acceleration from 0 to 100 km/h takes approximately 3.7 seconds, with a remarkable top speed surpassing 320 km/h. 61 | 62 | Incorporating advanced aerodynamic features and cutting-edge stability technologies, the CLR GTR ensures exceptional stability and control, particularly during high-speed maneuvers. 💨 63 | 64 | Originally priced around $1.5 million, the Mercedes CLR GTR is considered one of the most exclusive and prestigious racing cars ever produced. 💰 65 | 66 | Its limited production run of just five units adds to its rarity, making it highly sought after by racing enthusiasts and collectors worldwide. 🌎 67 | Want to earn a million in 2024? 68 | Dive into these 5 captivating remote business opportunities that promise excitement and potential: 69 | 70 | Freelancing & Consulting: 71 | 72 | • Dive into the world of Content Writing 73 | • Craft Compelling Copywriting 74 | • Unleash Creative Genius in Graphic Design 75 | • Build Memorable Brands with Branding Services 76 | 77 | E-commerce & Dropshipping: 78 | 79 | • Embark on the Adventure of Online Store Launching 80 | • Revolutionize Sales with Inventory-Free Dropshipping 81 | 82 | Online Coaching & Courses: 83 | 84 | • Share Your Passion and Expertise through Online Coaching 85 | • Create Transformative Courses that Resonate with Audiences""", 86 | """Earning a million dollars in 2024 is a challenging but achievable goal. Here are several strategies to consider: 87 | 88 | 1. **Start a High-Growth Business**: Launching a tech startup or a business in a high-growth industry can offer significant returns if you can scale quickly and capture market share. 89 | 90 | 2. **Invest in the Stock Market**: Strategic investing in stocks, particularly growth stocks or emerging industries, can yield substantial returns. Consider diversifying your portfolio and staying informed about market trends. 91 | 92 | 3. **Real Estate Investments**: Investing in real estate properties, particularly in growing markets or through real estate investment trusts (REITs), can generate significant returns through appreciation and rental income. 93 | 94 | 4. **Develop a Scalable Online Business**: Creating an online business, such as an e-commerce store, digital product, or subscription service, can reach a broad audience and scale quickly. 95 | 96 | 5. **Cryptocurrency and Blockchain**: Investing in cryptocurrencies or blockchain projects can be highly profitable, though it comes with higher risk and volatility. 97 | 98 | 6. **Innovate and Monetize Intellectual Property**: Developing a new product, technology, or content that can be patented or licensed could provide substantial revenue. 99 | 100 | 7. **High-Income Careers**: Pursuing high-paying careers in finance, technology, or other lucrative fields, combined with strategic savings and investments, can accumulate wealth over time. 101 | 102 | 8. **Leverage Social Media and Influencer Marketing**: Building a strong personal brand or social media presence can open opportunities for sponsorships, partnerships, and other revenue streams. 103 | 104 | Whichever path you choose, ensure you research thoroughly, plan strategically, and manage risks effectively.""" 105 | ] 106 | 107 | 108 | # """ 109 | # """, --------------------------------------------------------------------------------