Skip to content

Commit 88cff1c

Browse files
committed
Start fetchin'
1 parent 866db3c commit 88cff1c

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Terminal.Browser
22

33
## TODO:
4-
- [ ] Figure out how input will work : Done
5-
- [ ] Move to using selenium to fecth the page
4+
- [ ] Move to using selenium/playwrite to fetch the page
65
- [ ] Move to using textual TUI for a better UI
76

87

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ mdurl==0.1.2
33
Pygments==2.19.2
44
rich==14.1.0
55
beautifulsoup4==4.13.2
6+
playwright==1.37.0

src/FetchURL.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env python3
2+
import requests
3+
from bs4 import BeautifulSoup
4+
from dataclasses import dataclass
5+
from urllib.parse import urlparse,urljoin
6+
import logging
7+
from typing import Optional, Tuple,List
8+
import re
9+
10+
"""
11+
try:
12+
from playwright.sync_api import sync_playwright
13+
PLAYWRIGHT_AVAILABLE = True
14+
except ImportError:
15+
PLAYWRIGHT_AVAILABLE = False
16+
"""
17+
18+
19+
class Fetcher:
20+
def __init__(self) -> None:
21+
pass
22+
def Fetch_static(self,url):
23+
pass
24+
def fetch_dynamic(self,url):
25+
pass
26+
27+
class Heuristic:
28+
def __init__(self) -> None:
29+
pass
30+
def looks_dynamic(self):
31+
pass
32+
33+

0 commit comments

Comments
 (0)