semvec/pypi-packages huggingface dataset:
aroay-pyppeteer 1.4
scrapy的一个下载中间件，无缝对接pyppeteer

This is a package for supporting pyppeteer in Scrapy, also this package is a module
in [GerapyPyppeteer](https://github.com/Gerapy/GerapyPyppeteer)

# 在原来基础上增加 page.click，以及代理的用户名和密码验证

```python
def start_requests(self):
    for page in range(1, 2):
        yield PyppeteerRequest(self.base_url, callback=self.parse_index, dont_filter=True,
                               wait_for=".vjs-poster",
                               click="xpath",
                               proxy="http://username:password@ip:prot")


```

```重定向解决办法，直接在原来页面点击，增加wait_for_next，验证下一面是否成功进入
def start_requests(self):
    yield PyppeteerRequest(
        url="https://www.d2pass.com/search?k=%E7%B9%B0%E3%82%8A%E8%BF%94%E3%81%97%E6%BF%83%E5%8E%9A%E3%81%AA%E3%81%AE%E3%82%92%E6%AC%B2%E3%81%97%E3%81%A6%E3%82%84%E3%81%BE%E3%81%AA%E3%81%84%E7%BE%8E%E3%83%9C%E3%83%87%E3%82%A3%E3%83%95%E3%83%BC%E3%83%89%E3%83%AB",
        wait_for=".gridimg", click=(
            "//*[@id='portfolio']/li/div/p[5]/a"), wait_for_next="#review-section",
        callback=self.parse)

```

# ScrapyPyppeteer

scrapy的一个下载中间件，无缝对接yppeteer

# handle await错误提示

在setting增加

```
AROAY_ENABLE_REQUEST_INTERCEPTION = False
```

# ScrapyPyppeteer

scrapy的一个下载中间件，无缝对接yppeteer

# 安装

pip3 install daoke-pyppeteer

```python
DOWNLOADER_MIDDLEWARES = {
    'aroay_pyppeteer.downloadermiddlewares.PyppeteerMiddleware': 543,
}
```

# 配置

```python
CONCURRENT_REQUESTS = 3
AROAY_PYPPETEER_PRETEND = False  # 默认为True,某些网站能检测无头或者webdriver驱动，需要开启
AROAY_PYPPETEER_HEADLESS = False  # 默认为True
AROAY_PYPPETEER_DOWNLOAD_TIMEOUT = 30  # 默认渲染页面超时时间30s

拦截请求
AROAY_PYPPETEER_IGNORE_RESOURCE_TYPES = ['stylesheet', 'script']
```

所有可选资源类型列表：

- document: the Original HTML document
- stylesheet: CSS files
- script: JavaScript files
- image: Images
- media: Media files such as audios or videos
- font: Fonts files
- texttrack: Text Track files
- xhr: Ajax Requests
- fetch: Fetch Requests
- eventsource: Event Source
- websocket: Websocket
- manifest: Manifest files
- other: Other files
geminitools 0.0.2
Talk to the Gemini Exchange API
Requires Python: >=3.8

# geminitools

Geminitools is a Python package that can help you talk to the Gemini Exchange REST API. 

Geminitools is a simple API. You can't interface 1:1 with the Gemini Exchange API with geminitools. There are other packages for that. Instead, the main thing you can do is buy. As of yet there is no sell option (why would you want to anyway?).

## Installation

`pip install geminitools`

## Example Usage

```
import geminitools

gem = geminitools.Gem('https://api.gemini.com', 'key', 'secret')

gem.place_cost_buy_order('BTCUSD', 10, 70000)
```

## API

### class geminitools.Gem(base_url, key, secret)

#### get_supported_symbols()

Make a call to the `/v1/symbols` endpoint and return a list of accepted symbols.

#### get_ticker_price(symbol, price_type='ask')

Make a call to the `/v1/pubticker/` endpoint and return the value defined by `price_type` - defaults to 'ask', the asking price.

#### convert_cost_to_asset_amount(symbol, cost, rounded=8)

Divides `cost` by the current ticker price given by `symbol` rounding to `rounded` decimal places, and returns the resulting asset amount. 

E.g. if `symbol` is 'btcusd', `cost` is 50 (USD) and the current ticker price is 60000 (USD), the result would be 50 / 60000 = 0.00083333 (BTC)

#### place_amount_buy_order(symbol, amount, price)

Make a call to the `/v1/order/new` endpoint, placing a buy order for `amount` with a limit of `price`, and returns the API response. If you pass `symbol` 'BTCUSD', `amount` would be the quantity of BTC you want to buy, while `price` would be the max USD market price you're willing to pay.

E.g. `amount` = 0.1 and `price` = 10000 would cause 0.1 BTC to be bought if the price of BTC is less than or equal to 10000 USD.

#### place_cost_buy_order(symbol, cost, price)

Similar to `place_asset_buy_order` but calculates the amount of the asset to buy based on the `cost` passed. Returns the API response.

E.g. Passing `symbol` 'BTCUSD' and a `cost` value of 10 would cause the order of 10 USD worth of BTC to be bought.