All Projects → FastestMolasses → fBrowser

FastestMolasses / fBrowser

Licence: MIT license
Helpful Selenium functions to make web-scraping easier and faster

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to fBrowser

schedule-tweet
Schedules tweets using TweetDeck
Stars: ✭ 14 (-12.5%)
Mutual labels:  selenium, webscraping, selenium-python
image-crawler
An image scraper that scraps images from unsplash.com
Stars: ✭ 12 (-25%)
Mutual labels:  selenium, webscraping
chesf
CHeSF is the Chrome Headless Scraping Framework, a very very alpha code to scrape javascript intensive web pages
Stars: ✭ 18 (+12.5%)
Mutual labels:  selenium, webscraping
impf-botpy
Impf Bot.py 🐍⚡ – Automatisierung für den Corona ImpfterminService Bot
Stars: ✭ 254 (+1487.5%)
Mutual labels:  selenium, selenium-python
tithiwa
Automate Web WhatsApp with selenium in python.
Stars: ✭ 17 (+6.25%)
Mutual labels:  selenium, selenium-python
Instagram-Giveaways-Winner
Instagram Bot which when given a post url will spam mentions to increase the chances of winning. Win Instagram Giveaways!
Stars: ✭ 95 (+493.75%)
Mutual labels:  selenium, selenium-python
CoWin-Vaccine-Notifier
Automated Python Script to retrieve vaccine slots availability and get notified when a slot is available.
Stars: ✭ 102 (+537.5%)
Mutual labels:  webscraper, webscraping
Sneakers Project
Using Selenium, Neha scraped data about 35 top selling sneakers of Nike and Adidas from stockx.com. She used this data to draw insights about sneaker resales.
Stars: ✭ 32 (+100%)
Mutual labels:  selenium, webscraping
Wswp
Code for the second edition Web Scraping with Python book by Packt Publications
Stars: ✭ 112 (+600%)
Mutual labels:  selenium, webscraping
Seleniumbase
A Python framework that inspires developers to become better test automation engineers. 🧠💡
Stars: ✭ 2,520 (+15650%)
Mutual labels:  selenium, selenium-python
ig-automatic-story-viewer
Python Program To Send Instagram Story Views
Stars: ✭ 17 (+6.25%)
Mutual labels:  selenium, selenium-python
super-anime-downloader
A program which takes an Anime name or URL and downloads the specified range of episodes.
Stars: ✭ 26 (+62.5%)
Mutual labels:  webscraper, webscraping
python-appium-framework
Complete Python Appium framework in 360 degree
Stars: ✭ 43 (+168.75%)
Mutual labels:  selenium, selenium-python
BookingScraper
🌎 🏨 Scrape Booking.com 🏨 🌎
Stars: ✭ 68 (+325%)
Mutual labels:  webscraper, webscraping
non-api-fb-scraper
Scrape public FaceBook posts from any group or user into a .csv file without needing to register for any API access
Stars: ✭ 40 (+150%)
Mutual labels:  selenium, webscraping
gcf-packs
Library packs for google cloud functions
Stars: ✭ 48 (+200%)
Mutual labels:  selenium, webscraper
scrape-youtube-channel-videos-url
This Python script is used to scrape all the video links from a youtube channel.
Stars: ✭ 34 (+112.5%)
Mutual labels:  selenium, selenium-python
selenium-grid-docker-swarm
web scraping in parallel with Selenium Grid and Docker
Stars: ✭ 32 (+100%)
Mutual labels:  selenium, webscraping
Instagram-Scraper-2021
Scrape Instagram content and stories anonymously, using a new technique based on the har file (No Token + No public API).
Stars: ✭ 57 (+256.25%)
Mutual labels:  selenium, webscraping
Selenium Python Helium
Selenium-python but lighter: Helium is the best Python library for web automation.
Stars: ✭ 2,732 (+16975%)
Mutual labels:  selenium, selenium-python

fBrowser | Quick-start Your Selenium Project

This library was created in order to help users quick-start their webscraping project. It includes several useful functions including a browser handler, new tab functionality, and more.

Installation

$ pip3 install fBrowser

Usage

Browser Handler

You can decorate your function with a browserHandler. This will create the driver and properly quit it if an exception occurs or when the program ends.

from time import sleep
from fBrowser import browserHandler


@browserHandler()
def main(driver):
    driver.get('https://www.google.com')
    sleep(5)


main()

You can also pass in these optional arguments:

@browserHandler(path='', firefox=False, proxy='<host/ip>:<port>',
                headless=True, implicitWaitTime=60, incognito=True)

New Tab

Run a function in a new tab of Chrome. It will automatically close and switch contexts when it finishes executing.

You can use the newTab function to decorate your selenium functions. Doing so will execute your function in a new tab of the browser. Your decorated function must have its first parameter for the webdriver.

from time import sleep
from fBrowser import browserHandler, newTab


@newTab
def loadTheVerge(driver):
    driver.get('https://www.theverge.com')
    sleep(2)


@browserHandler()
def main(driver):
    driver.get('https://www.google.com')
    sleep(2)
    loadTheVerge(driver)


main()

Login

Use this helper function to login into a site. Simply pass in your email / username and your password. (This function assumes that the input tags in the form have attributes @type=username, @type=email, or @type=password).

import fBrowser
from fBrowser import browserHandler


@browserHandler()
def main(driver):
    driver.get(
        'https://stackoverflow.com/users/login')
    fBrowser.login(driver, email='[email protected]', password='abc123')


main()

Fill Inputs

Quickly fill multiple inputs with either a single value or multiple values.

import fBrowser
from fBrowser import browserHandler


@browserHandler()
def main(driver):
    driver.get('example.com')
    # A list of xpaths to the inputs
    xpaths = ['//*[@name="foo"]', '//*[@name="bar"]', '//@name="fooBar"']

    # Fill with multiple values
    fBrowser.fillInputs(driver, xpaths, ['value1', 'value2', 'value3'])

    # Or pass in one value
    fBrowser.fillInputs(driver, xpaths, 'hello world')


main()

Human Type

Don't want to get flagged as a bot? Fill your inputs using a human-like typing speed.

import fBrowser
from time import sleep
from fBrowser import browserHandler


@browserHandler()
def main(driver):
    driver.get('https://www.google.com')
    chatInput = driver.find_element_by_xpath('//*[@name="q"]')
    # Will input the string at a human-like typing speed
    fBrowser.humanType(driver, chatInput, 'Hello world!')
    sleep(5)


main()

Contributing

  1. Fork it (https://github.com/FastestMolasses/fBrowser/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].