Skip to content

Instantly share code, notes, and snippets.

View msguner's full-sized avatar
🎯
Focusing

Muhammet Safa GÜNER msguner

🎯
Focusing
View GitHub Profile
@msguner
msguner / log.py
Created February 16, 2022 15:01 — forked from batzner/log.py
Python logging helper module
"""Helper module for logging.
Example Usage:
from log import get_logger, get_out_dir_of_logger
LOG = get_logger(__name__)
LOG.info('Logging to %s' % get_out_dir_of_logger(LOG))
"""
@msguner
msguner / selenium_xhr_requests_via_performance_logging.py
Created December 27, 2021 00:43 — forked from lorey/selenium_xhr_requests_via_performance_logging.py
Access Chrome's network tab (e.g. XHR requests) with Selenium
#
# This small example shows you how to access JS-based requests via Selenium
# Like this, one can access raw data for scraping,
# for example on many JS-intensive/React-based websites
#
from time import sleep
from selenium import webdriver
from selenium.webdriver import DesiredCapabilities
@msguner
msguner / scrape_with_logs.py
Created December 27, 2021 00:40 — forked from rengler33/scrape_with_logs.py
How to Capture Network Traffic When Scraping with Selenium & Python
# see rkengler.com for related blog post
# https://www.rkengler.com/how-to-capture-network-traffic-when-scraping-with-selenium-and-python/
import json
import pprint
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
capabilities = DesiredCapabilities.CHROME