Pages:
Author

Topic: AutoReply v1.0 (Read 669 times)

member
Activity: 103
Merit: 10
August 23, 2019, 01:30:56 AM
#30
I might be misunderstanding all of it but have a query in mind. The forum is for learning from others posts and comment and contributing if we can right? If we make a bot post some content then how can we get all of the knowledge?

"AutoReply" might be not the best suited name.

What the script actually does is to check the threads you provide and bump them if the requirements allow it (i.e. 24 hours have passed).
This is not meant to be used to participate in discussions or to spam random topics, but to bump your own topics (e.g. offering service) for more visibility while not breaking the forum rules and having the least amount of work.

It is more an "AutoBump" script, than "AutoReply".

Thanks for the informative reply. Smiley Got it.
legendary
Activity: 1624
Merit: 2481
August 22, 2019, 09:23:26 AM
#29
I might be misunderstanding all of it but have a query in mind. The forum is for learning from others posts and comment and contributing if we can right? If we make a bot post some content then how can we get all of the knowledge?

"AutoReply" might be not the best suited name.

What the script actually does is to check the threads you provide and bump them if the requirements allow it (i.e. 24 hours have passed).
This is not meant to be used to participate in discussions or to spam random topics, but to bump your own topics (e.g. offering service) for more visibility while not breaking the forum rules and having the least amount of work.

It is more an "AutoBump" script, than "AutoReply".
member
Activity: 103
Merit: 10
August 22, 2019, 04:50:19 AM
#28
I might be misunderstanding all of it but have a query in mind. The forum is for learning from others posts and comment and contributing if we can right? If we make a bot post some content then how can we get all of the knowledge?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
August 10, 2019, 06:44:46 AM
#27
Anyway, i would try to uninstall it and reinstall the package-manager version of pip, and then try it again without updating pip:
Code:
sudo python3 -m pip uninstall pip && sudo apt-get install python3-pip --reinstall

Using python3 -m pip install -r requirements.txt should work afterwards.
It fails here:
Code:
Collecting websockets (from pyppeteer>=0.0.14->requests-html==0.10.0->-r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/79/78/17e97a159dc55308b1468a638c7267f19765281f6205ec9c15253c154022/websockets-8.0.2.tar.gz (57kB)
    100% |################################| 61kB 12.8MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "", line 1, in
      File "/tmp/pip-build-9fhjti3j/websockets/setup.py", line 27, in
        raise Exception("websockets requires Python >= 3.6.")
    Exception: websockets requires Python >= 3.6.
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9fhjti3j/websockets/
You are using pip version 8.1.1, however version 19.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Do you have Python 3.6? I completely forgot it was only available for that specific version of Python
My Python version older Sad

I give up for now, I've been busy fixing other stuff, but this VPS turns out to be too unstable for any serious use so I'll continue this when I have a better VPS.
full member
Activity: 154
Merit: 128
August 06, 2019, 09:42:10 AM
#26
That's what it told me to do, and indeed I did that.

Usually it is not recommended to do that.

Such problems can appear when mixing distribution manager (apt-get) and other tools to update software (in this case pip itself).

Did it say that there is a new version and you should update or that it is mandatory ?


Anyway, i would try to uninstall it and reinstall the package-manager version of pip, and then try it again without updating pip:
Code:
sudo python3 -m pip uninstall pip && sudo apt-get install python3-pip --reinstall

Using python3 -m pip install -r requirements.txt should work afterwards.


By the way, which version of python3 and pip are you using?
Code:
python3 --version && pip3 --version

Do you have Python 3.6? I completely forgot it was only available for that specific version of Python
legendary
Activity: 1624
Merit: 2481
August 06, 2019, 02:22:29 AM
#25
That's what it told me to do, and indeed I did that.

Usually it is not recommended to do that.

Such problems can appear when mixing distribution manager (apt-get) and other tools to update software (in this case pip itself).

Did it say that there is a new version and you should update or that it is mandatory ?


Anyway, i would try to uninstall it and reinstall the package-manager version of pip, and then try it again without updating pip:
Code:
sudo python3 -m pip uninstall pip && sudo apt-get install python3-pip --reinstall

Using python3 -m pip install -r requirements.txt should work afterwards.


By the way, which version of python3 and pip are you using?
Code:
python3 --version && pip3 --version
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
August 05, 2019, 08:56:05 AM
#24
Try:
Code:
python3 -m pip install requests-html==0.10.0
Code:
python3 -m pip install requests-html==0.10.0
Collecting requests-html==0.10.0
  ERROR: Could not find a version that satisfies the requirement requests-html==0.10.0 (from versions: 0.0.1, 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.4.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6)
ERROR: No matching distribution found for requests-html==0.10.0

Did you upgrade pip3 outside of your distributions package manager (i.e. using pip3 --upgrade) ?
That's not really recommended.
That's what it told me to do, and indeed I did that.

Quote
If you however still want to use the up-do-date (and not supported by your OS) version of pip, try it with the following command:
Code:
python3 -m pip install -r requirements.txt
Code:
python3 -m pip install -r requirements.txt
Collecting requests-html==0.10.0 (from -r requirements.txt (line 1))
  ERROR: Could not find a version that satisfies the requirement requests-html==0.10.0 (from -r requirements.txt (line 1)) (from versions: 0.0.1, 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.4.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6)
ERROR: No matching distribution found for requests-html==0.10.0 (from -r requirements.txt (line 1))

I didn't intend to do it outside my package manager though.
legendary
Activity: 1624
Merit: 2481
August 05, 2019, 08:38:20 AM
#23
What's the output when you run pip3 install -r requirements.txt ?
pip3:
Code:
pip3 install -r requirements.txt
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in
    from pip import main
ImportError: cannot import name 'main'

Did you upgrade pip3 outside of your distributions package manager (i.e. using pip3 --upgrade) ?
That's not really recommended.

If you however still want to use the up-do-date (and not supported by your OS) version of pip, try it with the following command:
Code:
python3 -m pip install -r requirements.txt
legendary
Activity: 2758
Merit: 6830
August 05, 2019, 08:36:47 AM
#22
pip3:
Code:
pip3 install -r requirements.txt
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in
    from pip import main
ImportError: cannot import name 'main'
Looks like an Issue with pip3. It's running an error when you try to use it to download the requirements.

Try:
Code:
python3 -m pip install requests-html==0.10.0
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
August 05, 2019, 08:33:10 AM
#21
What's the output when you run pip3 install -r requirements.txt ?
pip3:
Code:
pip3 install -r requirements.txt
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in
    from pip import main
ImportError: cannot import name 'main'

pip:
Code:
pip install -r requirements.txt
Collecting requests-html==0.10.0 (from -r requirements.txt (line 1))
  ERROR: Could not find a version that satisfies the requirement requests-html==0.10.0 (from -r requirements.txt (line 1)) (from versions: 0.0.1, 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.4.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6)
ERROR: No matching distribution found for requests-html==0.10.0 (from -r requirements.txt (line 1))

Quote
That's the only thing I ran and it worked.
I'm trying to run it on my VP (Ubuntu 16.04.6 LTS).
legendary
Activity: 2758
Merit: 6830
August 05, 2019, 08:15:43 AM
#20
This is what I did, following the suggestions for upgrades:
Code:
pip3 install -r requirements.txt

And this is the error I'm stuck with now:
Code:
 ERROR: Could not find a version that satisfies the requirement requests-html==0.10.0 (from -r requirements.txt (line 1)) (from versions: 0.0.1, 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.4.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6)
ERROR: No matching distribution found for requests-html==0.10.0 (from -r requirements.txt (line 1))
What's the output when you run pip3 install -r requirements.txt ?

That's the only thing I ran and it worked.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
August 05, 2019, 07:36:22 AM
#19
here you go, I didn't run this all the way through, but it should work. Note that you will need to edit the USERNAME, PASSWORD, and CAPTCHA_CODE variables at the top of the script.
(total python n00b here)

This is what I did, following the suggestions for upgrades:
Code:
sudo apt install python3-pip
sudo apt-get update
sudo apt install python3-pip
pip3 install -r requirements.txt
pip3 install --upgrade pip
pip install -r requirements.txt

And this is the error I'm stuck with now:
Code:
  ERROR: Could not find a version that satisfies the requirement requests-html==0.10.0 (from -r requirements.txt (line 1)) (from versions: 0.0.1, 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.4.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6)
ERROR: No matching distribution found for requests-html==0.10.0 (from -r requirements.txt (line 1))
full member
Activity: 154
Merit: 128
August 03, 2019, 04:08:47 PM
#18
Code is safe, no backdoor or similar.
I check it

Thank you, Python is a fairly safe language to begin with, always good to be cautious though! The only security issue with this is the fact that your username and password are stored in plaintext, I plan to fix this soon by using console input to store encrypted versions of your original username, password, etc.

As you knew, I am not a fan of userscript, because I don't run any kind of business here, and simply would prefer to use given options/ features from forum. However, I have one suggestion for OP, that is: the userscript should allow users to set up their prefered timegaps between pumps, rather than a default (or only by now) with 24 hours per one bump (with delete of past bump, because it help users don't violate forum rules.).
This new option will help users to choose bumping their thread each three days or each 7 days.

Yea I will implement this in the next update, it's very simple to do. You could also do something similar by just changing the "interval" to a ridiculously high number, meaning the script would only check if a thread needed to be bumped every week, for example.
legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
August 03, 2019, 03:24:50 PM
#17
Code is safe, no backdoor or similar.
I check it
legendary
Activity: 2758
Merit: 6830
August 03, 2019, 08:42:47 AM
#16
Can an expert confirm whether this code is safe? I am currently learning Python so my knowledge is not that efficient.
Not an expert but I know some Python and the code is pretty small. It doesn’t do anything it shouldn’t do.
full member
Activity: 154
Merit: 128
August 03, 2019, 08:02:18 AM
#15
Can an expert confirm whether this code is safe? I am currently learning Python so my knowledge is not that efficient.

I've read how it works, it's simple and easy to understand, also re-pumping topics will reduce a lot of time.

I did not understand "interval"? I thought it would be, post "YOUR_BUMPING_MESSAGE" in "YOUR_TOPIC_NUMBER", at "TIME(MIN_HOUR)", Delete "BUMPING_MESSAGE" in "YOUR_TOPIC_NUMBER", at "TIME(MIN_HOUR)."

The interval is just the frequency of requests (or how often the program checks threads to see if it needs to auto reply). Usually I would suggest setting this number fairly high as it uses less resources. The timing is all automatic through post time stamps and your local time.
legendary
Activity: 2702
Merit: 4002
August 03, 2019, 02:36:56 AM
#14
Can an expert confirm whether this code is safe? I am currently learning Python so my knowledge is not that efficient.

I've read how it works, it's simple and easy to understand, also re-pumping topics will reduce a lot of time.

I did not understand "interval"? I thought it would be, post "YOUR_BUMPING_MESSAGE" in "YOUR_TOPIC_NUMBER", at "TIME(MIN_HOUR)", Delete "BUMPING_MESSAGE" in "YOUR_TOPIC_NUMBER", at "TIME(MIN_HOUR)."
legendary
Activity: 2044
Merit: 1018
Not your keys, not your coins!
August 02, 2019, 10:10:48 PM
#13
As you knew, I am not a fan of userscript, because I don't run any kind of business here, and simply would prefer to use given options/ features from forum. However, I have one suggestion for OP, that is: the userscript should allow users to set up their prefered timegaps between pumps, rather than a default (or only by now) with 24 hours per one bump (with delete of past bump, because it help users don't violate forum rules.).
This new option will help users to choose bumping their thread each three days or each 7 days.
full member
Activity: 154
Merit: 128
August 02, 2019, 02:59:10 PM
#12
~

no, i mean, with opensource
- i can inspect code
- i can learn from code
- i can improve code


Yea I am the same way, I love just looking at others code. I find it so interesting, especially in Python where the structure is so flexible. I found this GitHub page the other day and I spent hours just looking at it. It opens my eyes to how many different ways there are to do things and I often try to implement new styles as a way to learn them. I'm glad that you are so happy about my barely working script lol.


For the thread:

Automatic deletions are now implemented! This is most likely extremely buggy, so I need your help! Over the next few days I will be testing this and improving the script. Eventually I plan to package it into an .exe so it's available to everyone. As for next ideas, I am thinking of also adding "scheduled posts".

legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
August 02, 2019, 02:57:53 AM
#11

Scripts for reproducible things, you meant?

no, i mean, with opensource
- i can inspect code
- i can learn from code
- i can improve code


Smiley
Pages:
Jump to: