Link Kısaltma Projesi GELİN KOŞUN!

#/usr/bin/env Python
#-*-coding:utf-8-*-

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
from selenium.common.exceptions import TimeoutException

from io import open
import time
import datetime
from datetime import date
import os
import sys

reload(sys)
sys.setdefaultencoding("utf-8")

from Tkinter import *

import requests
from bs4 import BeautifulSoup
from random import choice

def GetProxy():
	url = 'https://www.sslproxies.org/'
	r = requests.get(url)
	soup = BeautifulSoup(r.content,'html5lib')
	return choice(list(map(lambda x: x[0]+':'+x[1],list(zip(list(map(lambda x: x.text, soup.find_all('td')[::8])),(map(lambda x: x.text, soup.find_all('td')[1::8])))))))


def islem():
	proxy = GetProxy()
	firefox_capabilities = webdriver.DesiredCapabilities.FIREFOX
	firefox_capabilities['marionette'] = True

	firefox_capabilities['proxy'] = {
		"proxyType": "MANUAL",
	"httpProxy": proxy,
	"ftpProxy": proxy,
	"sslProxy": proxy
	}
														
	driver = webdriver.Firefox(capabilities=firefox_capabilities)
														
	driver.set_page_load_timeout(15)

	try:
		driver.get('http://www.sendekazanbizimle.com/hasan.asp')
		time.sleep(7)
		b1 = driver.find_element_by_xpath('//*[@id="getLink"]')
		time.sleep(10)
		b1.click()
		driver.quit()
	except TimeoutException as e:
		print("Proxy Patlak Çıktı...!")
		driver.quit()
	finally:
		driver.quit()

def tekrar():
	for i in range(0, 99999999):
		print("%s Defa Çalışıyor" % i)
		islem()

tekrar()

Arkadaşlar Python 2.7 ile çalışan proxy otomatik çeken ve girişleri kendisi yapan BC.VC için kodlanmış bir kompeti uygulamadır. YAPAN HASAN HÜSEYİN(cCcOSMANLIcCc)

1 Beğeni