المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Ait Academy دورات عبر الإنترنت حول العالم ابدأ ثورك الوظيفي



السكون الصاخب
08-04-2020, 05:24 AM
Ait Academy دورات عبر الإنترنت حول العالم ابدأ ثورك الوظيفي

https://i.imgur.com/e9ApskZ.png (http://albertoit.com)


موقع "Ait Academy (http://albertoit.com)".
إنه لمن دواعي سرورنا البالغ أن نرحب بكم ترحيبا حارا في موقعنا على الإنترنت ونشكركم على اهتمامكم بدوراتنا. نحن متأكدين من أنكم ستوافقونا على أن الوسم الرقمي هو الحاضر والمستقبل.
لذا ، التركيز!
على ما ستفعله حيال ذلك اليوم!
التركيز؛ على من تريد أن تصبح ؛ ونجم يقول لنفسك ما تريد أن تكون!
نحن نقوم بتسويق جميع عقاراتنا على مواقع العقارات الكبيرة.
دورة تصميم مواقع الإنترنت الرقمية
ينضم المستخدمون الجدد كل أسبوع
انضم إلى مجتمع الأعضاء لدينا حول العالم لمساعدتك على النجاح
http://albertoit.com
تحتاج مساعدة؟ اتصل بنا الآن:
+201270773366
lms@albertoit.com

لاميس
08-05-2020, 03:21 PM
""" required libraries pip3 install requests bs4 tldextract selenium tabulate netaddr pyOpenSSL re requests pickle time glob os subprocess traceback socket six tldextract traceback shutil datetime shutil OpenSSL readline threading getpass random string traceback from bs4 import BeautifulSoup from threading import Thread from threading import Thread from tldextract import extract as tld_extract from threading import Thread from selenium import webdriver as selenium_webdriver from selenium.common import exceptions as selenium_exceptions from itertools import chain as itertools_chain from tabulate import tabulate from datetime import date as datetime_date from urllib.parse import urljoin from netaddr import IPNetwork, IPAddress from urllib.parse import urljoin urllib3 """ error = [] try: import re except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: import requests except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: import time except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: import glob except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: import os except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: import subprocess except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: import traceback except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: import threading except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: from selenium import webdriver as selenium_webdriver except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: from selenium.common import exceptions as selenium_exceptions except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass try: from selenium.webdriver.common import keys as selenium_keys except (SyntaxError, ModuleNotFoundError) as e: error.append(e) else: pass

لاميس
08-05-2020, 03:52 PM
# from libs.ext_mngr import subprocess, selenium_webdriver, selenium_exceptions from libs.browser_requests import Firefox from libs.url_mngr import schema_based_url from libs.file_mngr import is_path_exist, correct_path, current_dir def get_firefox_browser(headless, special=0): # options = selenium_webdriver.FirefoxOptions() firefox_profile = selenium_webdriver.FirefoxProfile() options.add_argument("-safe-mode") options.add_argument('-incognito') # if headless: options.add_argument('-headless') # if special: options.add_argument("-mute-audio") options.add_argument("-disable-media-source") firefox_profile.set_preference('permissions.defaul t.stylesheet', 2) firefox_profile.set_preference('permissions.defaul t.image', 2) firefox_profile.set_preference('dom.ipc.plugins.en abled.libflashplayer.so', 'false') firefox_profile.set_preference("dom.webnotifications.enabled", False) firefox_profile.set_preference('dom.successive_dia log_time_limit', 0) firefox_profile.accept_untrusted_certs = True options.add_argument('--ignore-ssl-errors=yes') firefox_profile.set_preference('media.autoplay.def ault', 1) firefox_profile.set_preference('media.autoplay.all ow-muted', False) firefox_profile.set_preference("intl.accept_languages", 'locale') firefox_profile.set_preference('dom.ipc.plugins.en abled.libflashplayer.so', 'false') firefox_profile.set_preference("general.useragent.override", 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) ' 'Gecko/20100101 Firefox/25.0') firefox_profile.set_preference('useAutomationExten sion', False) options.add_argument('--disable-automation') firefox_profile.set_preference("dom.webdriver.enabled", False) browser = Firefox(options=options, firefox_profile=firefox_profile, log_path='NUL') # webdriver. if is_path_exist('core/main_ext.xpi'): browser.install_addon(correct_path(current_dir(), 'core/main_ext.xpi'), temporary=True) # return browser, "gecodriver" # def browser_get(browser, url, force_regain=0): url = schema_based_url(url) if not browser.current_url == url or force_regain: try: browser.get(url) except (selenium_exceptions.TimeoutException, selenium_exceptions.WebDriverException) as e: return else: try: browser.switch_to.alert.dismiss() except selenium_exceptions.NoAlertPresentException: pass return 1 def browser_request(browser, method, url, data = dict()): if method == "post": request = browser.request(method, url, data=data) else: request = browser.request(method, url, params=data) return request # def browser_killer(browser, process_name, wild=0): # try: browser.quit() except (AttributeError, TypeError) as e: # if wild: # subprocesses = subprocess.getoutput("killall" + process_name) except Exception: print("Browser exit failed") def scroll_down(browser): browser.execute_script("window.scrollTo(0, document.body.scrollHeight);") def window_switcher(browser, window_num): browser.switch_to.window(browser.window_handles[window_num]) def window_creator(browser): browser.execute_script("window.open('', '_blank');") def close_window(browser,window_num): browser.switch_to.window(browser.window_handles[window_num]) browser.close()

لاميس
08-05-2020, 04:01 PM
from libs.ext_mngr import glob,os from pathlib import Path from libs.var_mngr import unique # def is_path_exist(fil_path, empty=0): if os.path.exists(fil_path) and (empty or not os.stat(fil_path).st_size == 0): return 1 return 0 def get_using_dict(list1, dir2, ext=".rtcl"): files = [f[:-len(ext)] for f in list_dir(dir2) if len(f) > len(ext) and ext == f[-len(ext):]] dic = dict() for ar in load_files(list1): try: dic.update({eval(ar)[0]:eval(ar)[1]}) except: pass return [[fil,dic[fil]] for fil in files if fil in dic.keys()] # def con_write(fil_path, data, header=1): make_path(fil_path, is_file=1) with open(fil_path, 'a',newline='\n',encoding='utf-8-sig') as f2s: if header: f2s.write("#[TIME]: " + str(datetime.datetime.now()) + "\n") for ind in data: f2s.writelines(str(ind) + '\n') f2s.close() return 0 # def correct_path(*elems): path = os.path.join(*elems) if path and not path[-1] == "/": path = path + "/" return path # def correct_fpath(*elems): return correct_path(*elems)[:-1] # def del_path(path): if os.path.isfile(path): os.remove(path) elif os.path.isdir(path): shutil.rmtree(path) return 0 # def load_files(file_name, as_it=0, recursive=0): if type(file_name) == str: if os.path.isdir(file_name) and recursive: file_name = correct_path(file_name) + "**/*.*" files = [f for f in glob.iglob(file_name, recursive=recursive)] else: files = file_name data = load_files_helper(files, as_it) if as_it: if len(data): return "\n\n".join(data) else: return "" return data # def load_files_helper(paths, as_it=0): lines = [] for path in paths: files = [] if os.path.isdir(path): for _, _, f in os.walk(path): for fil in f: files.append(correct_fpath(path, fil)) elif os.path.isfile(path): files.append(path) for fil in files: data = load_txt(fil, as_it=as_it) lines.extend(data) return unique(lines) # def load_txt(file_path, as_it=0): with open(file_path, 'r', encoding='utf-8') as txt_fil: # , encoding='ISO-8859-1' data = txt_fil.read() txt_fil.close() if len(data) > 1 and "\ufeff" == data[0]: data = data[1:] if as_it: data = [data] else: data = data.splitlines() data = [dta for dta in data if not "[TIME]: " in dta and not dta == ""] return data # def make_path(path, is_file=0): path = os.path.dirname(path) if path and not os.path.isdir(path): os.makedirs(path, exist_ok=True) # def test_folder_in_dir(main_dir, folder): return [path for path in Path(main_dir).rglob(folder) if is_path_exist(correct_fpath(path, "prog.txt"))] # path = glob.glob(correct_path(main_dir, folder)) # if not path: # path = glob.glob(correct_path(main_dir, "**", folder)) def is_dir(path): return os.path.isdir(path) # def list_dir(path): if path: if is_dir(path) and not path[-1] == os.sep: path += os.sep return [p[len(path):] + os.sep if len(p) and is_dir(p) and p[-1] != os.sep else p[len(path):] for p in glob.glob(path + '*')] else: return None def list_files(path): txtfiles = [] for file in glob.glob(path): txtfiles.append(file) def current_dir(): return os.getcwd() # def home_dir(): return os.path.expanduser("~") def force_exit(): os._exit(1)