This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
from bs4 import BeautifulSoup | |
import validators | |
def extract_all_links(site): | |
html = requests.get(site).text | |
soup = BeautifulSoup(html, 'html.parser').find_all('a') | |
links = [link.get('href') for link in soup] | |
unique_links = set(links) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datefinder | |
from hurry.filesize import size | |
from datetime import datetime | |
dateFormat = "%a %d/%m/%y %I:%M %p" | |
fromFormat = "%a %b %d %H:%M:%S %Y" | |
file = open("/var/log/openvpn/status.log", "r") | |
Lines = file.readlines() | |