Skip to content

Instantly share code, notes, and snippets.

View ArjixWasTaken's full-sized avatar

Angelos Bouklis ArjixWasTaken

  • Greece
  • 17:28 (UTC +03:00)
View GitHub Profile
@ArjixWasTaken
ArjixWasTaken / requests.js
Last active July 19, 2021 20:44
An attempt to make the fetch api easier in JS by imitating python's requests module.
// 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) => {
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 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