Skip to content

Instantly share code, notes, and snippets.

View victorgabrielbs's full-sized avatar

Victor Gabriel victorgabrielbs

View GitHub Profile
@victorgabrielbs
victorgabrielbs / script.py
Last active March 13, 2024 22:01
webscrapping explainshell.com
import sys
from selenium import webdriver
from selenium.webdriver.edge.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from bs4 import BeautifulSoup
def perform_scraping(command):
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
use HTML::TreeBuilder;
my $url = 'https://www.gnu.org/software/software.html';
my $mech = WWW::Mechanize->new();
$destino = "$env:USERPROFILE\Pictures\Wallpapers"
if (-not (Test-Path $destino)) {
New-Item -ItemType Directory -Path $destino | Out-Null
}
$arquivos = Get-ChildItem -Path $PWD -File -Recurse | Where-Object { $_.Extension -match "png|jpg" }
foreach ($arquivo in $arquivos) {
Move-Item -Path $arquivo.FullName -Destination $destino -Force
#!/bin/zsh
if [[ $# -eq 0 ]]; then
echo "Por favor, forneça um arquivo de texto como argumento."
exit 1
fi
file_content=$(<"$1")
file_content=${file_content//$'\n'/ }