Skip to content

Instantly share code, notes, and snippets.

View gioiliop7's full-sized avatar
:octocat:
Hello

Giorgos Iliopoulos gioiliop7

:octocat:
Hello
View GitHub Profile
@eliac7
eliac7 / plaisio.py
Created May 23, 2023 19:44
Python script for scraping product data from a website using Selenium WebDriver. It automates the search process for a list of product codes on https://www.plaisio.gr/ and saves the results in a CSV file. The script utilizes Chrome WebDriver and includes error handling for cases where no search results are found. The code is organized into funct…
import csv
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from webdriver_manager.chrome import ChromeDriverManager
CODES = [
# List of product codes to search for
@stavros-melidoniotis
stavros-melidoniotis / social-share-links.php
Created April 26, 2022 07:19
Generate social share links for a given post in Wordpress
@champsupertramp
champsupertramp / Ultimate Member - Assign specific default Profile Photo to a user role
Created November 11, 2021 07:30
Ultimate Member - Assign specific default Profile Photo to a user role
add_filter("um_user_avatar_url_filter",function( $url, $user_id, $data ){
um_fetch_user( $user_id );
$role = um_user("role");
if( strpos( $url ,"gravatar") > -1 || strpos( $url ,"profile_photo") < -1 ){
if( $role == 'subscriber' ){
return "https://via.placeholder.com/150/0000FF/FFFFFF?text=Subscriber";
}else if( $role == 'administrator' ){
return "https://via.placeholder.com/150/FF0000/FFFFFF?text=Administrator";
}else if( $role == 'bbp_spectator' ){