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
This is a module that I had created along with my friend. It's a basic web scraping module

QuickInfo PYPI link : https://pypi.org/project/quickinfo/ This is the library that you've all been searching for, it's built for developers and allows

OneBit 2 Dec 13, 2021
A leetcode scraper to compile all questions in leetcode free tier to text file. pdf also available.

A leetcode scraper to compile all questions in leetcode free tier to text file, pdf also available. if new questions get added, run again to get new questions.

3 Dec 07, 2021
Web Scraping Practica With Python

Web-Scraping-Practica Integrants: Guillem Vidal Pallarols. Lídia Bandrés Solé Fitxers: Aquest document és el primer que trobem. A continuació trobem u

2 Nov 08, 2021
Web Content Retrieval for Humans™

Lassie Lassie is a Python library for retrieving basic content from websites. Usage import lassie lassie.fetch('http://www.youtube.com/watch?v

Mike Helmick 570 Dec 19, 2022
News, full-text, and article metadata extraction in Python 3. Advanced docs:

Newspaper3k: Article scraping & curation Inspired by requests for its simplicity and powered by lxml for its speed: "Newspaper is an amazing python li

Lucas Ou-Yang 12.3k Jan 07, 2023
Docker containerized Python Flask API that uses selenium to scrape and interact with websites

Docker containerized Python Flask API that uses selenium to scrape and interact with websites

Christian Gracia 0 Jan 22, 2022
Snowflake database loading utility with Scrapy integration

Snowflake Stage Exporter Snowflake database loading utility with Scrapy integration. Meant for streaming ingestion of JSON serializable objects into S

Oleg T. 0 Dec 06, 2021
Web scrapping

Project Setup Table of Contents Project Setup Table of Contents Run project locally Install Requirements Run script Run project locally Install Requir

Charles 3 Feb 04, 2022
Python script for crawling ResearchGate.net papers✨⭐️📎

ResearchGate Crawler Python script for crawling ResearchGate.net papers About the script This code start crawling process by urls in start.txt and giv

Mohammad Sadegh Salimi 4 Aug 30, 2022
Linkedin webscraping - Linkedin web scraping with python

linkedin_webscraping This is the first step of a full project called "LinkedIn J

Pedro Dib 4 Apr 24, 2022
基于Github Action的定时HITsz疫情上报脚本,开箱即用

HITsz Daily Report 基于 GitHub Actions 的「HITsz 疫情系统」访问入口 定时自动上报脚本,开箱即用。 感谢 @JellyBeanXiewh 提供原始脚本和 idea。 感谢 @bugstop 对脚本进行重构并新增 Easy Connect 校内代理访问。

Ter 56 Nov 27, 2022
Scrape plants scientific name information from Agroforestry Species Switchboard 2.0.

Agroforestry Species Switchboard 2.0 Scraper Scrape plants scientific name information from Species Switchboard 2.0. Requirements python = 3.10 (you

Mgs. M. Rizqi Fadhlurrahman 2 Dec 23, 2021
A simple flask application to scrape gogoanime website.

gogoanime-api-flask A simple flask application to scrape gogoanime website. Used for demo and learning purposes only. How to use the API The base api

1 Oct 29, 2021
tweet random sand cat pictures

sandcatbot setup pip3 install --user -r requirements.txt cp sandcatbot.example.conf sandcatbot.conf vim sandcatbot.conf running the first parameter i

jess 8 Aug 07, 2022
High available distributed ip proxy pool, powerd by Scrapy and Redis

高可用IP代理池 README | 中文文档 本项目所采集的IP资源都来自互联网,愿景是为大型爬虫项目提供一个高可用低延迟的高匿IP代理池。 项目亮点 代理来源丰富 代理抓取提取精准 代理校验严格合理 监控完备,鲁棒性强 架构灵活,便于扩展 各个组件分布式部署 快速开始 注意,代码请在release

SpiderClub 5.2k Jan 03, 2023
TikTok Username Swapper/Claimer/etc

TikTok-Turbo TikTok Username Swapper/Claimer/etc I wanted to create it as fast as possible but i eventually gave up and recoded it many many many many

Kevin 12 Dec 19, 2022
This Spider/Bot is developed using Python and based on Scrapy Framework to Fetch some items information from Amazon

- Hello, This Project Contains Amazon Web-bot. - I've developed this bot for fething some items information on Amazon. - Scrapy Framework in Python is

Khaled Tofailieh 4 Feb 13, 2022
Kusonime scraper using python3

Features Scrap from url Scrap from recommendation Search by query Todo [+] Search by genre Example # Get download url from kusonime import Scrap

MhankBarBar 2 Jan 28, 2022
Works very well and you can ask for the type of image you want the scrapper to collect.

Works very well and you can ask for the type of image you want the scrapper to collect. Also follows a specific urls path depending on keyword selection.

Memo Sim 1 Feb 17, 2022
SearchifyX, predecessor to Searchify, is a fast Quizlet, Quizizz, and Brainly webscraper with various stealth features.

SearchifyX SearchifyX, predecessor to Searchify, is a fast Quizlet, Quizizz, and Brainly webscraper with various stealth features. SearchifyX lets you

28 Dec 20, 2022