Our great sponsors
-
Clone-Wars
100+ open-source clones of popular sites like Airbnb, Amazon, Instagram, Netflix, Tiktok, Spotify, Whatsapp, Youtube etc. See source code, demo links, tech stack, github stars.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
from urllib.request import urlopen from bs4 import BeautifulSoup import os CLONE_URL = 'https://github.com/GorvGoyl/Clone-Wars' DOWNLOAD_DIR = 'clone_wars_projects' def get_project_list(): json_list = [] page = urlopen(CLONE_URL) soup = BeautifulSoup(page, 'html.parser') table = soup.find('table') table_body = table.find('tbody') table_rows = table_body.find_all('tr') for idx, row in enumerate(table_rows): cols = row.find_all('td') name = cols[0].text live_url = cols[1].text github_url = [url.text.rstrip('/') for url in cols[2].find_all('a')] tehnologies = cols[3].text json_list.append({ 'name': name, 'live_url': live_url, 'github_url': github_url, 'tehnologies': tehnologies, }) # if idx == 2: # break return json_list project_list = get_project_list() def extract_project_infos(url): info = url.split('github.com')[1] return info.split('/')[1] + '_'+ info.split('/')[2] def git_clone(url, name): cmd = f'git clone {url} {os.path.join(DOWNLOAD_DIR, name)}' os.system(cmd) # make download dir if not os.path.isdir(DOWNLOAD_DIR): os.mkdir(DOWNLOAD_DIR) if __name__=='__main__': for project in project_list: for url in project['github_url']: proj_info = extract_project_infos((url)) project_path = os.path.join(os.getcwd(), DOWNLOAD_DIR, proj_info) if not os.path.isdir(project_path): # and len(os.listdir(project_path)) == 0: try: git_clone(url, proj_info) except Exception as e: print(e)