Skip to content

Instantly share code, notes, and snippets.

View bot-unit's full-sized avatar
🐾
У меня лапки

Unit bot-unit

🐾
У меня лапки
  • Spain
View GitHub Profile
@bot-unit
bot-unit / holding.py
Last active December 6, 2023 16:34
get ETF holdings from ft
import requests
import bs4
import pandas as pd
headers = {'User-agent': 'Mozilla/5.0'}
def search_etf(ticker, region='UK', is_etf=True):
search_site = f"https://markets.ft.com/data/funds/ajax/search"
params = {
@bot-unit
bot-unit / snp500.py
Created November 27, 2023 15:49
s-and-p-500-companies
import requests
from bs4 import BeautifulSoup
def get_table_from_slickcharts(url: str) -> List[Dict[str, Union[str, float]]]:
# parse table for symbols from slickcharts
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
response = requests.get(url, headers=headers)
data = []