Traceback (most recent call last): File…
- User
Traceback (most recent call last): File "C:\Users\ILEG-i5-11\Downloads\Compressed\YouTubeViews--master\youtube.py", line 116, in youtube_views = Views(args.urllist, args.visits, args.min, args.max) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ILEG-i5-11\Downloads\Compressed\YouTubeViews--master\youtube.py", line 26, in init self.min = int(min) ^^^^^^^^ ValueError: invalid literal for int() with base 10: '[minWatch]'
youtube.py:
from argparse import ArgumentParser from os import path from random import randint from subprocess import call from subprocess import getoutput as shell from sys import exit from threading import Thread from time import sleep
from core.browser import Browser from core.queue import Queue from core.tor import Tor
class Views(Browser, Tor):
def __init__(self, urllist, visits, min, max): self.bots = 5 # max amount of bots to use self.count = 0 # returning bots self.ip = None self.alive = True self.targets = {} # {url: visits} self.recentIPs = Queue(10) self.min = int(min) self.max = int(max) self.visits = int(visits) if not path.exists(urllist): exit('Error: Unable to locate `{}`'.format(urllist)) # read the url list with open(urllist, 'r') as f: try: for url in [_ for _ in f.read().split('\n') if _]: self.targets[url] = 0 # initial view except Exception as err:exit('Error:', err) def display(self, url): n = '\033[0m' # null ---> reset r = '\033[31m' # red g = '\033[32m' # green y = '\033[33m' # yellow b = '\033[34m' # blue call('clear') print('') print(' +------ Youtube Views ------+') print(' [-] Url: {}{}{}'.format(g, url, n)) print(' [-] Proxy IP: {}{}{}'.format(b, self.ip, n)) print(' [-] Visits: {}{}{}'.format(y, self.targets[url], n)) def visit(self, url): try: if self.watch(url): views = self.targets[url] self.targets[url] = views + 1 except:pass finally:self.count -= 1 def connection(self): try: br = self.createBrowser() br.open('https://example.com', timeout=2.5) br.close() except: print('Error: Unable to access the internet') self.exit() def exit(self): self.alive = False self.stopTor() def run(self): ndex = 0 while all([self.alive, len(self.targets)]): urls = [] # tmp list of the urls that are being visited self.restartTor() if not self.ip:continue for _ in range(self.bots): try: url = [_ for _ in self.targets][ndex] except IndexError:return view = self.targets[url] if view >= self.visits: del self.targets[url] continue if url in urls:continue # prevent wrapping ndex = ndex+1 if ndex < len(self.targets)-1 else 0 Thread(target=self.visit, args=[url]).start() urls.append(url) self.count += 1 sleep(1) while all([self.count, self.alive]): for url in urls: try: self.display(url) [sleep(1) for _ in range(7) if all([self.count, self.alive])] except: self.exit() - Assistant
The error message indicates that there is a problem converting the parameter
mininto an integer:ValueError: invalid literal for int() with base 10: '[minWatch]'This error typically happens when the value passed to
int()is not a valid string representation of an integer. In this case, it looks like the value'[minWatch]'is being passed as an argument where a number was expected.To resolve this issue, you should make sure that when you run your
youtube.pyscript from the command line, you are passing correct arguments forminandmax. They should be numbers representing the minimum and maximum watch time in seconds, as intended by the script.For example, you should call your script something like this:
python youtube.py 300 urllist.txt 38 65Here is the number of visits, is the file containing the URLs of the YouTube videos, is the min watch time, and is the max watch time.
- User
(myenv) C:\Users\ILEG-i5-11\Downloads\Compressed\YouTubeViews--master>python youtube.py 200 youtubeLinks.txt 38 65 Installing Tor ... Please Install Tor
I have alreayd installed Tor
- Assistant
The error message "Please Install Tor" is coming from a check in your Python script, which is looking for the Tor installation at the path '/usr/sbin/tor'. It seems that the script is primarily designed for a Unix-like system (such as Linux or macOS), and might not be directly compatible with Windows due to the hardcoded path.
On Windows, Tor is typically not installed in '/usr/sbin/tor', so the script fails to locate Tor even when it's installed. You will need to modify the
youtube.pyscript to properly check for the existence of Tor on Windows or configure the script to work with the Windows installation of Tor. - User
(myenv) C:\Users\ILEG-i5-11\Downloads\Compressed\YouTubeViews--master>pip install Tor Requirement already satisfied: Tor in d:\myenv\lib\site-packages (1.0.0)
(myenv) C:\Users\ILEG-i5-11\Downloads\Compressed\YouTubeViews–master>python youtube.py 200 youtubeLinks.txt 38 65 Installing Tor … Please Install Tor
- Assistant
Based on your terminal output, it looks like you've run
pip install Tor, which might not install the actual Tor service that the script is looking for. TheTorPython package from PyPI is likely not the same as the Tor network software that theyoutube.pyscript requires to operate.To have the Tor network functioning on your Windows machine, you need to install the Tor Browser or the Tor Expert Bundle.
To install Tor on Windows:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.