chayapan / favlinks

MIT License
1 stars 0 forks source link

3. Add Favorite URL #3

Open chayapan opened 7 months ago

chayapan commented 7 months ago
  1. Add Favorite URL

As a User: I want to add a new favorite URL with an optional category and tags.

Objective: To save and organize web links for easy access and retrieval.

Expectations:

chayapan commented 7 months ago

See this snippet from my past project to get the HTML page title.

import requests
from lxml import html
from dataset import Factsheet
import pandas as pd
import xlrd
import os, os.path

# Get Sector Symbols
url = "https://www.settrade.com/C04_08_stock_sectorcomparison_p1.jsp?txtSymbol=SCB"
r = requests.get(url)
print(r.status_code, r.encoding)
tree = html.fromstring(r.content)
tree

# dir(tree.xpath('//a')[4])