-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel.py
More file actions
24 lines (18 loc) · 763 Bytes
/
model.py
File metadata and controls
24 lines (18 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import requests
from bs4 import BeautifulSoup
class Developer:
def __init__(self, lang, activity, years):
self.lang = lang
self.activity = activity
self.years = years
def new_url(username: str, mode:str) -> str:
if mode == "repos":
return f"https://github.com/{username}?tab=repositories"
if mode == "default":
return f"https://github.com/{username}"
def new_soup(url: str) -> BeautifulSoup:
response = requests.get(url)
soup = BeautifulSoup(response.content, "html.parser")
return soup
backend_lang = ["C#", "C++", "C", "Go", "Java", "PHP", "Python", "Ruby", "Rust", "Perl", "Jupyter Notebook", "Shell", "Scala", "Dockerfile"]
frontend_lang = ["CSS", "HTML", "JavaScript", "TypeScript", "Kotlin", "Swift"]