Update repository URLs and improve import handling

This commit is contained in:
Klaro
2025-02-06 18:58:48 +01:00
parent 51c0603732
commit e9d3c77f56
5 changed files with 31 additions and 36 deletions

View File

@@ -1,11 +1,11 @@
![Twitch Channel Points Miner - v2](https://raw.githubusercontent.com/rdavydov/Twitch-Channel-Points-Miner-v2/master/assets/banner.png)
<p align="center">
<a href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/releases"><img alt="Latest Version" src="https://img.shields.io/github/v/release/rdavydov/Twitch-Channel-Points-Miner-v2?style=flat&color=white&logo=github&logoColor=white"></a>
<a href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/stargazers"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/rdavydov/Twitch-Channel-Points-Miner-v2?style=flat&color=limegreen&logo=github&logoColor=white"></a>
<a href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/releases"><img alt="Latest Version" src="https://img.shields.io/github/v/release/rdavydov/Twitch-Channel-Points-Miner-v2?style=flat&color=white&logo=github&logoColor=white"></a>
<a href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/stargazers"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/rdavydov/Twitch-Channel-Points-Miner-v2?style=flat&color=limegreen&logo=github&logoColor=white"></a>
<a href='https://github.com/MShawon/github-clone-count-badge'><img alt='GitHub Traffic' src='https://img.shields.io/badge/dynamic/json?style=flat&color=blue&label=views&query=count&url=https://gist.githubusercontent.com/rdavydov/ad9a3c6a8d9c322f9a6b62781ea94a93/raw/traffic.json&logo=github&logoColor=white'></a>
<a href='https://github.com/MShawon/github-clone-count-badge'><img alt='GitHub Clones' src='https://img.shields.io/badge/dynamic/json?style=flat&color=purple&label=clones&query=count&url=https://gist.githubusercontent.com/rdavydov/fed04b31a250ad522d9ea6547ce87f95/raw/clone.json&logo=github&logoColor=white'></a>
<a href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/blob/master/LICENSE"><img alt="License" src="https://img.shields.io/github/license/rdavydov/Twitch-Channel-Points-Miner-v2?style=flat&color=black&logo=unlicense&logoColor=white"></a>
<a href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/rdavydov/Twitch-Channel-Points-Miner-v2?style=flat&color=lightyellow&logo=github&logoColor=white"></a>
<a href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/blob/master/LICENSE"><img alt="License" src="https://img.shields.io/github/license/rdavydov/Twitch-Channel-Points-Miner-v2?style=flat&color=black&logo=unlicense&logoColor=white"></a>
<a href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/rdavydov/Twitch-Channel-Points-Miner-v2?style=flat&color=lightyellow&logo=github&logoColor=white"></a>
</p>
<p align="center">
@@ -18,7 +18,7 @@
</p>
<h1 align="center">https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2</h1>
<h1 align="center">https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2</h1>
**Credits**
- Main idea: https://github.com/gottagofaster236/Twitch-Channel-Points-Miner
@@ -62,19 +62,9 @@ Read more about the channel points [here](https://help.twitch.tv/s/article/chann
## Community
If you want to help with this project, please leave a star 🌟 and share it with your friends! 😎
If you want to offer me a coffee, I would be grateful! ❤️
| | |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
|<a href="https://bitcoin.org" target="_blank"><img src="https://dynamic-assets.coinbase.com/e785e0181f1a23a30d9476038d9be91e9f6c63959b538eabbc51a1abc8898940383291eede695c3b8dfaa1829a9b57f5a2d0a16b0523580346c6b8fab67af14b/asset_icons/b57ac673f06a4b0338a596817eb0a50ce16e2059f327dc117744449a47915cb2.png" alt="Donate BTC" height="16" width="16"></a>|`bc1qq49mvgda2zw4f9kta0a85xztwuxewqwac5eckd` _(<a href="https://bitcoin.org" target="_blank">BTC</a>)_|
|<a href="https://dogechain.info" target="_blank"><img src="https://dynamic-assets.coinbase.com/3803f30367bb3972e192cd3fdd2230cd37e6d468eab12575a859229b20f12ff9c994d2c86ccd7bf9bc258e9bd5e46c5254283182f70caf4bd02cc4f8e3890d82/asset_icons/1597d628dd19b7885433a2ac2d7de6ad196c519aeab4bfe679706aacbf1df78a.png" alt="Donate DOGE" height="16" width="16"></a>|`DAKzncwKkpfPCm1xVU7u2pConpXwX7HS3D` _(<a href="https://dogechain.info" target="_blank">DOGE</a>)_|
|<a href="https://www.donationalerts.com/r/rdavydov" target="_blank"><img src="https://www.donationalerts.com/static/donations/dist/favicon.ico" alt="Donate via DonationAlerts" height="16" width="16"></a>|https://www.donationalerts.com/r/rdavydov|
|<a href="https://boosty.to/rdavydov/donate" target="_blank"><img src="https://static.boosty.to/static/favicon.png?v=11" alt="Donate via Boosty" height="16" width="16"></a>|https://boosty.to/rdavydov/donate|
If you have any issues or you want to contribute, you are welcome! But please read the [CONTRIBUTING.md](https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/blob/master/CONTRIBUTING.md) file.
## Main differences from the original repository:
- Easyier usability especially for beginners 🚀
- Improved logging: emojis, colors, files and much more ✔️
- Final report with all the data ✔️
- Rewritten codebase now uses classes instead of modules with global variables ✔️
@@ -84,8 +74,8 @@ If you have any issues or you want to contribute, you are welcome! But please re
- Placing a bet / making a prediction with your channel points [#41](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/41) ([@lay295](https://github.com/lay295)) ✔️
- Switchable analytics chart that shows the progress of your points with various annotations [#96](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/96) ✔️
- Joining the IRC Chat to increase the watch time and get StreamElements points [#47](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/47) ✔️
- [Moments](https://help.twitch.tv/s/article/moments) claiming [#182](https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/issues/182) ✔️
- Notifying on `@nickname` mention in the Twitch chat [#227](https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/issues/227) ✔️
- [Moments](https://help.twitch.tv/s/article/moments) claiming [#182](https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/issues/182) ✔️
- Notifying on `@nickname` mention in the Twitch chat [#227](https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/issues/227) ✔️
## Logs feature
### Full logs
@@ -185,10 +175,10 @@ If you have any issues or you want to contribute, you are welcome! But please re
```
## How to use:
First of all please create a run.py file. You can just copy [example.py](https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/blob/master/example.py) and modify it according to your needs.
```python
# -*- coding: utf-8 -*-
!!!!UPDATING THAT SOON!!!!
import logging
from colorama import Fore
from TwitchChannelPointsMiner import TwitchChannelPointsMiner
@@ -339,7 +329,7 @@ twitch_miner.mine(followers=True, blacklist=["user1", "user2"]) # Blacklist exa
```
### By cloning the repository
1. Clone this repository `git clone https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2`
1. Clone this repository `git clone https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2`
2. Install all the requirements `pip install -r requirements.txt` . If you have problems with requirements, make sure to have at least Python3.6. You could also try to create a _virtualenv_ and then install all the requirements
```sh
pip install virtualenv
@@ -417,7 +407,7 @@ docker run --name user2 -v $(pwd)/user2.py:/usr/src/app/run.py:ro -p 5002:5000 r
#### Portainer
[Link](https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/wiki/Deploy-Docker-container-in-Portainer) to the illustrated guide on how to deploy a Docker container in Portainer.
[Link](https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/wiki/Deploy-Docker-container-in-Portainer) to the illustrated guide on how to deploy a Docker container in Portainer.
### Replit
@@ -450,7 +440,7 @@ You can combine all priority but keep in mind that use `ORDER` and `POINTS_ASCEN
| `less` | bool | False | Reduce the logging format and message verbosity [#10](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/10) |
| `console_level` | level | logging.INFO | Level of logs in terminal - Use logging.DEBUG for more helpful messages. |
| `console_username`| bool | False | Adds a username to every log line in the console if True. [#602](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/602)|
| `time_zone`| str | None | Set a specific time zone for console and file loggers. Use tz database names. Example: "America/Denver" https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/issues/205|
| `time_zone`| str | None | Set a specific time zone for console and file loggers. Use tz database names. Example: "America/Denver" https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/issues/205|
| `file_level` | level | logging.DEBUG | Level of logs in file save - If you think the log file it's too big, use logging.INFO |
| `emoji` | bool | For Windows is False else True | On Windows, we have a problem printing emoji. Set to false if you have a problem |
| `colored` | bool | True | If you want to print colored text [#45](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/45) [#82](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/82) |
@@ -725,7 +715,7 @@ pkg install python-pandas
**4. Clone this repository**
`git clone https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2`
`git clone https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2`
**5. Go to the miner's directory**

View File

@@ -32,7 +32,7 @@ USER_AGENTS = {
BRANCH = "master"
GITHUB_url = (
"https://raw.githubusercontent.com/rdavydov/Twitch-Channel-Points-Miner-v2/"
"https://raw.githubusercontent.com/0x8fv/Twitch-Channel-Points-Miner-v2/"
+ BRANCH
)

View File

@@ -27,7 +27,7 @@
<div class="container has-text-centered" style="height: 100vh;">
<div class="columns" id="header">
<div class="column has-text-right">
<a href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2" target="_blank"><img
<a href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2" target="_blank"><img
style="margin-top: -20px;" width="600px" src="{{url_for('static', filename='banner.png')}}"
alt="banner"></a>
</div>
@@ -35,14 +35,14 @@
<table>
<tr>
<td><a href="https://github.com/Tkd-Alex" target="_blank">Tkd-Alex</a></td>
<td><a href="https://github.com/rdavydov" target="_blank">rdavydov</a></td>
<td><a href="https://github.com/0x8fv" target="_blank">Klaro</a></td>
</tr>
<tr>
<td><a href="https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/blob/master/LICENSE">
<img alt="License"
src="https://img.shields.io/github/license/Tkd-Alex/Twitch-Channel-Points-Miner-v2" /></a>
</td>
<td><a href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/blob/master/LICENSE">
<td><a href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/blob/master/LICENSE">
<img alt="License"
src="https://img.shields.io/github/license/rdavydov/Twitch-Channel-Points-Miner-v2" /></a>
</td>
@@ -62,7 +62,7 @@
<img alt="PRsWelcome"
src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" /></a>
</td>
<td><a href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/pulls">
<td><a href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/pulls">
<img alt="PRsWelcome"
src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" /></a>
</td>
@@ -72,7 +72,7 @@
<img alt="GitHub Repo stars"
src="https://img.shields.io/github/stars/Tkd-Alex/Twitch-Channel-Points-Miner-v2" /></a>
</td>
<td><a href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/stargazers">
<td><a href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/stargazers">
<img alt="GitHub Repo stars"
src="https://img.shields.io/github/stars/rdavydov/Twitch-Channel-Points-Miner-v2" /></a>
</td>
@@ -84,7 +84,7 @@
src="https://img.shields.io/github/issues-closed/Tkd-Alex/Twitch-Channel-Points-Miner-v2"></a>
</td>
<td><a
href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/issues?q=is%3Aissue+is%3Aclosed">
href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2/issues?q=is%3Aissue+is%3Aclosed">
<img alt="GitHub closed issues"
src="https://img.shields.io/github/issues-closed/rdavydov/Twitch-Channel-Points-Miner-v2"></a>
</td>
@@ -94,7 +94,7 @@
<img alt="GitHub last commit"
src="https://img.shields.io/github/last-commit/Tkd-Alex/Twitch-Channel-Points-Miner-v2" /></a>
</td>
<td><a href="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2">
<td><a href="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2">
<img alt="GitHub last commit"
src="https://img.shields.io/github/last-commit/rdavydov/Twitch-Channel-Points-Miner-v2" /></a>
</td>

11
main.py
View File

@@ -12,9 +12,14 @@ def set_console_title(title):
clear_console()
set_console_title("Klaro's Twitch Miner")
from TwitchChannelPointsMiner import TwitchChannelPointsMiner
from TwitchChannelPointsMiner.classes.Settings import FollowersOrder
from TwitchChannelPointsMiner.logger import LoggerSettings
while True:
try:
from TwitchChannelPointsMiner import TwitchChannelPointsMiner
from TwitchChannelPointsMiner.classes.Settings import FollowersOrder
from TwitchChannelPointsMiner.logger import LoggerSettings
break
except ImportError:
os.system("pip install -r requirements.txt")
def load_or_create_config(file_path):
default_config = {

View File

@@ -22,7 +22,7 @@ setuptools.setup(
description="A simple script that will watch a stream for you and earn the channel points.",
license="GPLv3+",
keywords="python bot streaming script miner twtich channel-points",
url="https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2",
url="https://github.com/0x8fv/Twitch-Channel-Points-Miner-v2",
packages=setuptools.find_packages(),
include_package_data=True,
install_requires=[