Skip to content

Instantly share code, notes, and snippets.

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

Sam realsama

🏠
Working from home
View GitHub Profile
@ergoithz
ergoithz / xpath_soup.py
Last active October 11, 2024 03:23
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.
@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