Python Web Scrapper Project

Overview

Web Scrapper

Projeto desenvolvido em python, sobre tudo com Selenium, BeautifulSoup e Pandas é um web scrapper que puxa uma tabela com as principais empresas listadas na bolsa, no site fundamentus e após isso aplica uma série de filtros que são úteis no mundo dos investimentos.

Plataforma disponível:

  • Linux

Componentes

Esse projeto é dividido em 4 partes básicas, sendo elas:

  • main_scrapper.py
  • filter_data.py
  • advanced_scrapper.py
  • utils.py

main_scrapper

Esse código é responsável por pegar os principais dados das empresas listadas na bolsa disponíveis no site fundamentus. Esse dados são transformados em um Data Frame pandas e depois disso ele salva em um arquivo Excel, chamado output.xlsx na pasta excel tables

filter_data

Essa parte do código é responsável por aplicar alguns filtros no output gerado. Removendo empresas com baixa liquides, empresas com Mrg. Ebit negativa e empresas do ramo financeiro, como seguradoras, bancos, etc. Após isso ele ordena por Ev/Ebit. Uma vez que os dados saíram desse filtro, eles já podem ser consultados para saber quais empresas podem ser investidas , levando em consideração as 30 primeiras

(Lembrando que isso foi por meio de algumas pesquisas e eu não posso dizer que você terá lucro nisso, reforçando que a intenção aqui é mostrar o código em python e não uma maneira de ganhar dinheiro)

advanced_scrapper

Essa parte aqui é avançada não por ser código complexos, mas a meu ver foi mais chata de fazer, além de que é a parte do código que mais demora. Nele, eu pego todos os papeis das ações e faço consultas individualizadas para buscar o valor atual ação, lpa e vpa. Após isso, eu uso a fórmula de Ben Graham para calcular o valor intrínseco da empresa (Eu zero as que estiverem com LPA ou VPA negativo, pois preciso calcular uma raíz quadrada). Uma vez que o loop foi finalizado, eu vou gerar um novo data frame apenas com as informações de LPA, VPA, VAlUE e VALUATION (valor intriseco) e gero uma saída em um novo arquivo excel

Para rodar

É necessários os seguintes elementos:

  • Python
  • Pandas
  • Selenium
  • bs4
  • chrome driver (o ques tá presente no pacote é para versão especifica do navegador que uso, mas pode baixar a vesão compatível com seu navegador no seguinte link: Chrome Driver)
cd webscrapper
chmod +x *
./main_scrapper.py 

Considerações Finais

para testar o programa por completo, pode ser que demore bastante pois o advanced scrapper consome muito tempo para buscar todas informações, caso queira ver ele rodando por completo. Sugiro que após executar o primeiro arquivo, você abra o output.xlsx e deixe apenas umas 10-20 linhas que ele executará o programa por completo mais rápido, além disso, após finalizado cada programa, ele vai automaticamente chamar o próximo do fluxo, então tem que ter um pouquinho de atenção.

Toda susgestão é bem vinda, pois é meu primeiro projeto nessa área então não entendo muito das boas práticas ou algo que possa melhorar, etc

Owner
Jordan Ítalo Amaral
Interested in Web development, Cyber Security and Data engineering
Jordan Ítalo Amaral
Danbooru scraper with python

Danbooru Version: 0.0.1 License under: MIT License Dependencies Python: = 3.9.7 beautifulsoup4 cloudscraper Example of use Danbooru from danbooru imp

Sugarbell 2 Oct 27, 2022
A Spider for BiliBili comments with a simple API server.

BiliComment A spider for BiliBili comment. Spider Usage Put config.json into config directory, and then python . ./config/config.json. A example confi

Hao 3 Jul 05, 2021
Current Antarctic large iceberg positions derived from ASCAT and OSCAT-2

Iceberg Locations Antarctic large iceberg positions derived from ASCAT and OSCAT-2. All data collected here are from the NASA SCP website Overview Thi

Joel Hanson 5 Jul 27, 2022
An introduction to free, automated web scraping with GitHub’s powerful new Actions framework.

An introduction to free, automated web scraping with GitHub’s powerful new Actions framework Published at palewi.re/docs/first-github-scraper/ Contrib

Ben Welsh 15 Nov 24, 2022
A web service for scanning media hosted by a Matrix media repository

Matrix Content Scanner A web service for scanning media hosted by a Matrix media repository Installation TODO Development In a virtual environment wit

Brendan Abolivier 5 Dec 01, 2022
Scraping weather data using Python to receive umbrella reminders

A Python package which scrapes weather data from google and sends umbrella reminders to specified email at specified time daily.

Edula Vinay Kumar Reddy 1 Aug 23, 2022
🤖 Threaded Scraper to get discord servers from disboard.org written in python3

Disboard-Scraper Threaded Scraper to get discord servers from disboard.org written in python3. Setup. One thread / tag If you whant to look for multip

Ѵιcнч 11 Nov 01, 2022
Raspi-scraper is a configurable python webscraper that checks raspberry pi stocks from verified sellers

Raspi-scraper is a configurable python webscraper that checks raspberry pi stocks from verified sellers.

Louie Cai 13 Oct 15, 2022
Python framework to scrape Pastebin pastes and analyze them

pastepwn - Paste-Scraping Python Framework Pastebin is a very helpful tool to store or rather share ascii encoded data online. In the world of OSINT,

Rico 105 Dec 29, 2022
Instagram_scrapper - This project allow you to scrape the list of followers, following or both from a public Instagram account, and create a csv or excel file easily.

Instagram_scrapper This project allow you to scrape the list of followers, following or both from a public Instagram account, and create a csv or exce

Lakhdar Belkharroubi 5 Oct 17, 2022
Extract embedded metadata from HTML markup

extruct extruct is a library for extracting embedded metadata from HTML markup. Currently, extruct supports: W3C's HTML Microdata embedded JSON-LD Mic

Scrapinghub 725 Jan 03, 2023
This is a simple website crawler which asks for a website link from the user to crawl and find specific data from the given website address.

This is a simple website crawler which asks for a website link from the user to crawl and find specific data from the given website address.

Faisal Ahmed 1 Jan 10, 2022
A tool can scrape product in aliexpress: Title, Price, and URL Product.

Scrape-Product-Aliexpress A tool can scrape product in aliexpress: Title, Price, and URL Product. Usage: 1. Install Python 3.8 3.9 padahal halaman ins

Rahul Joshua Damanik 1 Dec 30, 2021
A Python web scraper to scrape latest posts from official Coinbase's Blog.

Coinbase Blog Scraper A Python web scraper to scrape latest posts from official Coinbase's Blog. IDEA It scrapes up latest blog posts from https://blo

Lucas Villela 3 Feb 18, 2022
Twitter Eye is a Twitter Information Gathering Tool With Twitter Eye

Twitter Eye is a Twitter Information Gathering Tool With Twitter Eye, you can search with various keywords and usernames on Twitter.

Jolanda de Koff 19 Dec 12, 2022
Simply scrape / download all the media from an fansly account.

Simply scrape / download all the media from an fansly account. Providing updates as long as its continuously gaining popularity, so hit the ⭐ button!

Mika C. 334 Jan 01, 2023
Use Flask API to wrap Facebook data. Grab the wapper of Facebook public pages without an API key.

Facebook Scraper Use Flask API to wrap Facebook data. Grab the wapper of Facebook public pages without an API key. (Currently working 2021) Setup Befo

Encore Shao 2 Dec 27, 2021
A Python module to bypass Cloudflare's anti-bot page.

cloudscraper A simple Python module to bypass Cloudflare's anti-bot page (also known as "I'm Under Attack Mode", or IUAM), implemented with Requests.

VeNoMouS 2.6k Dec 31, 2022
抖音批量下载用户所有无水印视频

Douyincrawler 抖音批量下载用户所有无水印视频 Run 安装python3, 安装依赖

28 Dec 08, 2022
A simple, configurable and expandable combined shop scraper to minimize the costs of ordering several items

combined-shop-scraper A simple, configurable and expandable combined shop scraper to minimize the costs of ordering several items. Features Define an

2 Dec 13, 2021