Skip to content

Instantly share code, notes, and snippets.

View shepherd1530's full-sized avatar
🏠
Working from home

Sam shepherd1530

🏠
Working from home
View GitHub Profile
@sduthil
sduthil / add-webrtc-line.py
Last active April 11, 2022 18:04
Add Wazo webrtc lines to users that don't have any
#!/usr/bin/python3
# Copyright 2020 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later
import random
import string
from wazo_auth_client import Client as Auth
from wazo_confd_client import Client as Confd
@ergoithz
ergoithz / xpath_soup.py
Last active March 18, 2024 16:11
Generate unique XPATH for BeautifulSoup element
#!/usr/bin/python
# -*- coding: utf-8 -*-
import bs4
def xpath_soup(element):
# type: (typing.Union[bs4.element.Tag, bs4.element.NavigableString]) -> str
"""
Generate xpath from BeautifulSoup4 element.