Simple view bot

2022.01.19 20:34 deltavlokkies Simple view bot

So, I came across a simple youtube bot which works with proxies.
I tried it and it works fine, only deal breaker is, the cookie popup every time the script launches.
Now, I'm a total noob to python and I understand the basics, but I'm not so advanced that I can auto accept the cookie prompt.

Maybe someone can help me? :)

import re
import requests
from os import _exit
from time import sleep
from random import choice,uniform
from argparse import ArgumentParser
from threading import Thread
from traceback import print_exc
from fake_useragent import UserAgent
from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy,ProxyType

parser=ArgumentParser()
parser.add_argument('-t','--threads',type=int,help='set number of the threads',default=15)
parser.add_argument('-u','--url',help='set url of the video',default='',required=True)
parser.add_argument('-d','--duration',help='set the duration of the video in seconds',default=5*60)
parser.add_argument('-p','--proxies',help='set the path of the proxies list')
parser.add_argument('-us','--user-agent',help='set the user agent for the driver')
parser.add_argument('-uss','--user-agents',help='set the path of the list of the user agents for the driver')
parser.add_argument('-dr','--driver',help='set the driver for the bot',choices=['chrome','firefox'],default='chrome')
args=parser.parse_args()

def bot(url):

`try:` `while True:` `proxy.http_proxy=choice(proxies)` `proxy.ssl_proxy=proxy.http_proxy` `print(proxy.http_proxy)` `if args.driver=='chrome':` 
chrome_options.add_argument('user-agent="{}"'.format(args.user_agent or (args.user_agents and choice(user_agents)) or agent.random))
capabilities=webdriver.DesiredCapabilities.CHROME
proxy.add_to_capabilities(capabilities)
driver=webdriver.Chrome(options=chrome_options,desired_capabilities=capabilities)
 `else:` 
firefox_profile.set_preference('general.useragent.override',args.user_agent or (args.user_agents and choice(user_agents)) or agent.random)
firefox_profile.set_preference('network.proxy.type',1)
firefox_profile.set_preference('network.proxy.http',proxy.http_proxy.split(':')[0])
firefox_profile.set_preference('network.proxy.http_port',proxy.http_proxy.split(':')[1])
firefox_profile.set_preference('network.proxy.ssl',proxy.ssl_proxy.split(':')[0])
firefox_profile.set_preference('network.proxy.ssl_port',proxy.ssl_proxy.split(':')[1])
firefox_profile.update_preferences()
driver=webdriver.Firefox(firefox_profile=firefox_profile)
 `driver.get(args.url)` `sleep(float(args.duration))` `driver.close()` `except KeyboardInterrupt:_exit(0)` `except Exception:` `print_exc()` `_exit(1)` 

try:
`if args.proxies:` `proxies=open(args.proxies,'r').read().split('\n')` `else:` `proxies=re.findall(re.compile('([\d.]+)'),str(requests.get('`[`https://free-proxy-list.net/`](https://free-proxy-list.net/)`').content))` `proxies=['%s:%s'%x for x in list(zip(proxies[0::2],proxies[1::2]))]` `print('%d proxies successfully loaded!'%len(proxies))` `proxy=Proxy()` `proxy.proxy_type=ProxyType.MANUAL` `if args.user_agents:` `user_agents=open(args.user_agents,'r').read().split('\n')` `else:` `agent=UserAgent()` `if args.driver=='chrome':` `chrome_options=webdriver.ChromeOptions()` `chrome_options.add_argument('--mute-audio')` `else:` `firefox_profile=webdriver.FirefoxProfile()` `firefox_profile.set_preference('media.volum_scale','0.0')` `for i in range(args.threads):` `t=Thread(target=bot,args=(args.url,))` `t.deamon=True` `t.start()` `sleep(uniform(2.0,4.0))` 
except KeyboardInterrupt:_exit(0)
except Exception:
`print_exc()` `_exit(1)` 
submitted by deltavlokkies to learnpython [link] [comments]


2022.01.19 20:34 vodoko1 I won my court case

Me and a bro (before it was a legal state) had a cart and got caught by a cop. They tried to pull “trap card, Possession of illegal substance” on me. Lawyer said “now that it is legal in this state, how can you charge him your honor?” And I got off a free bird.
submitted by vodoko1 to weed [link] [comments]


2022.01.19 20:34 AggravatingVehicle3 The diabetes community makes me want to kill myself

That's it.
I hope you learn to be more understanding and less rude.
submitted by AggravatingVehicle3 to diabetes_t1 [link] [comments]


2022.01.19 20:34 satans_sunbeam I definitely posted ribs last time I posted here; but here's some sweet, smokey ribs paired with asparagus cooked in olive oil, minced garlic, and balsamic; topped with balsamic glaze and feta cheese. My 7 y/o says it's his new favorite dinner. 😭❤

I definitely posted ribs last time I posted here; but here's some sweet, smokey ribs paired with asparagus cooked in olive oil, minced garlic, and balsamic; topped with balsamic glaze and feta cheese. My 7 y/o says it's his new favorite dinner. 😭❤ submitted by satans_sunbeam to tonightsdinner [link] [comments]


2022.01.19 20:34 JBSeattle Tell me we are not about to have a price increase...

Tell me we are not about to have a price increase... I just read the message about the new round of funding - good for you I suppose.
I then went to check my billing to see when I would be paying for my renewal. What do you know? It says I am signed up for the Families plan at the rate of $5.49 per month, billed annually.
Pricing on billing page
Well, that's not what I signed up for. The Family pricing I paid and still listed on the pricing page is $4.99 per month.
Current pricing page on website
Please tell me we are not about to see a 10% price increase that affects existing subscribers.
submitted by JBSeattle to 1Password [link] [comments]


2022.01.19 20:34 Delta_hostile What should I do about becoming resentful towards my relationship due to lack of sex?

I'll keep it really short, me and my girlfriend don't have as much sex as I'd like due to circumstances out of both of our control, and I know she'd like to have more sex, but we've only had sex once since May, and it's beginning to affect my feelings towards both her and the relationship. I feel bad about becoming resentful but I can't help it, I'm not satisfied and I don't know what to do, at this point leaving the relationship has been on my mind despite it being my longest and happiest relationship, because it's stopped being my happiest. I'm unhappy and annoyed most of the time not and I feel bad, what should I do?
submitted by Delta_hostile to relationship_advice [link] [comments]


2022.01.19 20:34 politicly1 Supreme Court clears the way for House to get Treason Trump White House documents

Supreme Court clears the way for House to get Treason Trump White House documents submitted by politicly1 to politicly [link] [comments]


2022.01.19 20:34 lucky666123 a flower

a flower submitted by lucky666123 to Cinephiles [link] [comments]


2022.01.19 20:34 PoliticiansAlwaysLie Supreme Court won't block release of Trump documents to Jan 6 committee

Supreme Court won't block release of Trump documents to Jan 6 committee submitted by PoliticiansAlwaysLie to politics [link] [comments]


2022.01.19 20:34 Ordinary_Cantaloupe1 I'm (21F) torn between my ex (20M) and my classmate (24M)

I've been in so much pain and have nowhere else to turn but here. For background, I was with my ex (Leo) for 3 years. I loved him a lot but there were quite a few times I did want to break up but never did because I believed he'd easily let me go, and I was scared of being alone so I never did. I finally broke up with him in October, and it hurt so bad. We got into an argument and that was the last straw that made me believe that he wouldn't care if I left, but when I tried to break up he was a mess, and that's the most I've seen him want me.
I met my classmate (Ben) in school around August, but didn't really talk until later and I've come to really like him, and he likes me a lot. I know it might seem early but we both truly had a feeling that we were meant for each other, and at first I thought I could actually be in a happy relationship with him. I never jumped on it because I was still healing from my previous, and I was doing fine until Ben and I had this one conversation that basically started making me second guess giving him a shot. Basically it seemed like he wouldn't ever trust me if I wanted to be with him because he has doubts if my feelings would be true, and this to me was a red flag because if I were to actually date him in the future, I was scared that he'd constantly doubt me. And ever since then, I just got to know him more as friends and talk to him and see the type of person he is. He's great, there's just a few differences that I personally don't want in a partner, and it made me think about what I had with Leo. Part of me felt like this time apart from him was so that I can see how much Leo did for me, and it made me want him back.
Recently, I talked to Leo and I want to give us another try because I feel like the issues we had weren't that bad, they're fixable and I could be happy with him. But the thought of not ever giving Ben a chance scares me too because we both could see a happy future together, but I'm doubtful because of the things I don't like about him just being friends. And we did talk about those things together, and I just don't know what to do. Every time I think about choosing Ben, it hurts because I don't want to lose Leo again, and I really do think we can make it work. But when I think about choosing Leo, it hurts not knowing what could've been with Ben. I'm sorry if this is a mess, because I'm a horrible mess right now and I cannot think straight. I don't know what to do and I am stuck.
submitted by Ordinary_Cantaloupe1 to relationship_advice [link] [comments]


2022.01.19 20:34 Nurinou State of Survival : how can you really win Mission 30

submitted by Nurinou to TheSoSGame [link] [comments]


2022.01.19 20:34 christellee_ A question for men

What do you like to get as a gift at your birthday from your girlfriend ? My boyfriend’s 23m birthday is soon and I am confused what should I do, the gift is already decided and I know he will love it, but the question is , if I invited him for dinner + the gift, would that be enough ? (Ps we were in a long distance relationship for a while and my birthday passed and he didn’t even try to ask mom or any of my friends to bring me at least a flower from him) and few days ago he came back to the country and he will spend his birthday here..
submitted by christellee_ to dating_advice [link] [comments]


2022.01.19 20:34 ihate20200000 [NO SPOILER] We- Wen— Wendy Byrde and her- her— her constant forced stutter. Give me strength 😤

submitted by ihate20200000 to Ozark [link] [comments]


2022.01.19 20:34 lss_bvt_and_01 LssTest-ImagePost-72573

LssTest-ImagePost-72573 submitted by lss_bvt_and_01 to LssAutomation [link] [comments]


2022.01.19 20:34 TheSylence Not sure if a glitch? But I can't find an inventory. Any help appreciated

Not sure if a glitch? But I can't find an inventory. Any help appreciated submitted by TheSylence to masterduel [link] [comments]


2022.01.19 20:34 KingEuronIIIGreyjoy The Beatles - A Day in the Life

The Beatles - A Day in the Life submitted by KingEuronIIIGreyjoy to Musicthemetime [link] [comments]


2022.01.19 20:34 toxicpiecrow Katharina Mazepa

Katharina Mazepa submitted by toxicpiecrow to Katharina_Mazepa [link] [comments]


2022.01.19 20:34 beachykeen28 My apartment complex is doing cheek swabs of all of the dogs here

I was told this was to detect who isn’t cleaning up after their dog but I received nothing in writing about this. My concern is my dog is my dog is part husky and huskies are not allowed (her paperwork says basset hound mix). Is it legal for them to do this? Should I get something in writing? Is this even normal?! So strange to me.
submitted by beachykeen28 to dogs [link] [comments]


2022.01.19 20:34 Jvliem18 SSD recommendation

I'm currently using an HDD (2tb BarraCuda 7200) and have been told I should upgrade to an SSD which I've been meaning to do, but I'm semi new to computers and honestly don't know what to look for in an SSD. I've seen a lot of 970 evo plus but not much else. My price range is about 200-400
submitted by Jvliem18 to pcmasterrace [link] [comments]


2022.01.19 20:34 m00nbum Marika: Extra 60% Off Men's Sale Activewear Clothes & Free US Ship! Use code: EXTRA604ME

submitted by m00nbum to RunandBuy [link] [comments]


2022.01.19 20:34 apwgk Anti-conspiracy theorists of reddit, what's one conspiracy that you believe in?

submitted by apwgk to AskReddit [link] [comments]


2022.01.19 20:34 Sharko_GD true tho ngl

true tho ngl
https://preview.redd.it/osl8oeugcqc81.jpg?width=500&format=pjpg&auto=webp&s=8b138556884e2e44f3bbf6072dae4a6884a558d7
submitted by Sharko_GD to geometrydash [link] [comments]


2022.01.19 20:34 DumbPixelNFT Most NFT projects are boring and lack creativity, so I am curating a list of projects that are actually unique, fun and interesting - what do you think?

Most NFT projects are boring and lack creativity, so I am curating a list of projects that are actually unique, fun and interesting - what do you think? submitted by DumbPixelNFT to opensea [link] [comments]


2022.01.19 20:34 UsamiChann POV! You get quite severely harmed, so you walk to the nearest hospital. You walk in and immediately something feels off. What shall you do?~

POV! You get quite severely harmed, so you walk to the nearest hospital. You walk in and immediately something feels off. What shall you do?~ submitted by UsamiChann to GachaClubPOV [link] [comments]


2022.01.19 20:34 Shikor1312 Studiengänge nur für Frauen gerecht?

Moin Community,
könnte mir jemand erklären wieso es Studiengänge explizit für Frauen gibt? Ich möchte mit dieser Frage niemanden auf den Schlips treten sondern freue mich über anregende Beiträge.
Ist dies nicht in gewisser Form diskriminierend, da Frauen ja auch nicht explizit von Jobs oder Studiengängen ausgeschlossen werden?
Mir ist durchaus bewusst das gewisse Berufe und Branchen attraktiver gestaltet werden sollen und ich finde das auch unterstützenswert.
submitted by Shikor1312 to FragReddit [link] [comments]


http://argoynao.ru