semvec/pypi-packages huggingface dataset:
nindo 0.0.2
Unofficial API for https://nindo.de
Requires Python: >=3

# Nindo
This is an unofficial API for the [nindo.de](https://nindo.de) website.
# Getting Started
To get started you will have to import the Api and initialise it.
```python
from nindo import NindoApi
Api = NindoApi()
```
When thats done you can use the Api as follows:
```python
from nindo import NindoApi
Api = NindoApi()

Api.getVirals()
```

# Functions

## .getVirals()
Returns a list of the currently Viral Posts.

## .getCharts(platform)
Returns a list of the current Charts for the given platform.

## .getCoupons()
Returns a list of Coupons.

## .getUpcomingMilestones()
Returns a list of Milestones that haven't been surpassed yet.

## .getPastMilestones()
Returns a list of Milestones that have already been surpassed. 


# Classes

## Artist
`Artist.name` (String)\
`Artist.id` (String)

## Channel
`Channel.id` (String)\
`Channel.avatar` (String)\
`Channel.last_post_id` (String)

## Post
`Post.id` (String)\
`Post.platform` (String)\
`Post.timestamp` (String)\
`Post.title` (String or None)\
`Post.age_restricted` (Boolean)\
`Post.clickbait_score` (String)\
`Post.shitstorm_score` (String)\
`Post.shitstorm_score` (String)

`Post.artist` (Artist)\
`Post.channel` (Channel)

## Chart
`Chart.id` (String)\
`Chart.rank` (Integer)\
`Chart.artists` (Artist)\
`Chart.rank` (Integer)\
`Chart.type` (String)

## Viral
`Viral.id` (String)\
`Viral.platform` (String)\
`Viral.timestamp` (String)\
`Viral.type` (String)\
`Viral.value` (Integer)

## Milestone
`Milestone.current_subs` (Integer)\
`Milestone.expected_time` (String)\
`Milestone.surpassed` (Boolean)\
`Milestone.channel` (Channel)\
`Milestone.artist` (Artist)

## Brand
`Brand.id` (Integer)\
`Brand.name` (String)\
`Brand.url` (String)\
`Brand.branch` (String)\
`Brand.color` (String)

## Coupon
`Coupon.id` (Integer)\
`Coupon.timestamp` (String)\
`Coupon.discount` (String)\
`Coupon.code` (String)\
`Coupon.valid` (Boolean)\
`Coupon.validUntil` (String)\
`Coupon.url` (String)\
`Coupon.terms` (String)\
`Coupon.artist` (Artist)\
`Coupon.brand` (Brand)

## TYPES
The TYPES class is not like the other classes, it is used to work with the functions that the API provides. e. g.

```python
from nindo import TYPES, NindoApi
Api = NindoApi()
Api.getCharts(TYPES.Charts.YOUTUBE)
```

`TYPES.Chart.YOUTUBE` (String)\
`TYPES.Chart.INSTAGRAM` (String)\
`TYPES.Chart.TWITTER` (String)\
`TYPES.Chart.TWITCH` (String)\
`TYPES.Chart.TIKTOK` (String)\
`TYPES.Chart.DISPLAY` (Dictionary)
alcazar 0.8.0
Web scraper framework

[![Build Status](https://travis-ci.org/saintamh/alcazar.svg?branch=master)](https://travis-ci.org/saintamh/alcazar)
[![PyPI version](https://badge.fury.io/py/alcazar.svg)](https://pypi.org/project/alcazar/)

Alcazar is a Python library that simplifies the task of writing web scrapers.

Some of its core features are:

* *succinct syntax* for locating relevant data within an HTML page, JSON document, string of text
* *HTTP caching to disk* for exact replay of scrapes without resubmitting HTTP requests
* *Throttling* of requests to the same host
* *Automatic retries* when an HTTP request fails, or when a page fails to parse as expected
* *Crawler* facilities for maintaining a queue of URLs to visit
* *fail-fast*: by default, we'd rather crash than save incorrect or incomplete data

Alcazar brings together the following libraries:

* [Requests](https://github.com/requests/requests)
* [lxml](https://lxml.de/) (including [cssselect](https://lxml.de/cssselect.html))
* [JMESPath](http://jmespath.org/)

Getting Started
===============

Alcazar is [available on PyPi](https://pypi.org/project/alcazar/) so it can be installed it using `pip`:

```
pip install alcazar
```

The simplest way to use the library is to instantiate a `Scraper` and call its `fetch` method:

```python
>>> import alcazar
>>> scraper = alcazar.Scraper()
>>> page = scraper.fetch('https://en.wikipedia.org/wiki/Gorgie')
>>> print(page.one('div[@id="toc"]/preceding-sibling::p[./b]').text.normalized)
Gorgie (/ˈɡɔːrɡiː/ GOR-gee) is a densely populated area of Edinburgh, Scotland. It is located in the west of the city and borders Murrayfield, Ardmillan and Dalry.
```

In this snippet:

* we've fetched the HTML for the page
  * if any network error or HTTP error happens, we'll retry to fetch it a few times, sleeping increasing delays between every attempt
* we've parsed the HTML into a tree
  * using lxml's excellent handling and recovery from "broken" HTML, as seen in the wild
* we've located the element we're interested in
  * here using an XPath expression, but we could've used a CSS selector too
  * we've checked that there was one and only one element that matched our query
  * else an exception would've been thrown, ensuring we capture only exactly what we wanted
* we've extracted its text, removed all tags from it, and normalized its whitespace

See the `samples` directory for a taste of how Alcazar works.