This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2021 ArjixWasTaken | |
const isArray = (obj) => Array.isArray(obj); | |
const isDict = (obj) => { | |
if (typeof obj === "object" && !isArray(obj)) return true; | |
return false; | |
}; | |
const isDictEmpty = (obj) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup # pip install bs4 | |
import re | |
with open(r"PATH/TO/CHAPTERS/XML/FILE.xml", 'r') as f: | |
soup = BeautifulSoup(f.read(), 'html.parser') | |
chapters = soup.select('editionentry > chapteratom') | |
chapters_array = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a wrapper for my API that scrapes Yify (yts.mx) | |
# Import the API | |
from YifyAPI.yify import search_yify as search # pip install YifyAPI | |
# Import the table | |
from tabulate import tabulate # pip install tabulate | |
# Import other utilities | |
import click, os # pip install click |
NewerOlder