semvec/pypi-packages huggingface dataset:
threads-scraper 1.1.0
A Python package for scraping Threads posts.
Requires Python: >=3.7

# threads_scraper

A Python package for scraping Threads posts.

## Installation

Install the package using pip:

```bash
pip install threads-scraper
```

## Usage

```python
from threads_scraper.scraper import ThreadsScraper

# Initialize the scraper
scraper = ThreadsScraper(
    username="your_username",
    password="your_password",
    driver_path="/path/to/chromedriver",
)

scroll_times = 10
csv_index = True

# Start the scraper
scraper.get_driver()

if scraper.login_to_threads():
    data = scraper.scrape(["keyword1", "keyword2"], scroll_times) # default scroll_times = 5
    scraper.save_to_csv(data, "data/threads_posts.csv", csv_index) # default csv_index = False

scraper.close()
```
video-compressing 0.1.2
Package to compress multiple large .MOV or .MP4 videos into a single light .mp4 video.
Requires Python: <4.0.0,>=3.12.0

# Video Compressing

[![PyPI version](https://badge.fury.io/py/video-compressing.svg)](https://pypi.org/project/video-compressing/)

A Python library for reducing the size of and merging multiple video files. This package is designed for simplicity and efficiency, leveraging FFmpeg for video compression and manipulation.

## Features
- Reduce Video Size: Scale down video dimensions and bitrate using a customizable reduction factor.
- Merge Multiple Videos: Combine multiple video files into a single output.
- Command-Line Interface: Use the package directly from the terminal for quick processing.

## Installation
Clone the Repository
```bash
git clone https://github.com/Gabriel-melki/video-compressing.git
cd video-compressing
```

### Install Dependencies
This project uses Poetry for dependency management. Install Poetry if you don’t have it:
```bash
pip install poetry
```
Install the dependencies and activate the vitual environment:
```bash
poetry install
poetry shell
```

Ensure FFmpeg is installed on your system:

**Ubuntu/Debian:**
```bash
sudo apt update && sudo apt install ffmpeg
```
**MacOS (with Homebrew):**
```bash
brew install ffmpeg
```

**Windows:**

Download FFmpeg and add it to your PATH.

### Usage
Command-Line Tool
You can run the VideoCompressing tool directly from the terminal.

```bash
python -m src.video-compressing.reduce_video input1.mp4 input2.mp4 -r 0.5 -o output.mp4
```
Parameters:
 - input_files: List of input video files (required)
 - -r, --reduction-factor: A float value to scale down videos (required).
 Example: 0.5 reduces the size by 50%.
 - o, --output-file: Name of the output file (optional).
 Default: Automatically generated if not provided.

### Example:
Reduce and merge video1.mp4 and video2.mp4 by 50% into output.mp4:

```bash
python -m src.video-compressing.reduce_video video1.mp4 video2.mp4 -r 0.5 -o output.mp4
```

Without an output file:
```bash
python -m src.video-compressing.reduce_video video1.mp4 video2.mp4 -r 0.5
```

Using as a Library
Import and call the reduce_and_merge_videos function directly in your Python code:

```python
from src.video-compressing.tools import reduce_and_merge_videos

reduce_and_merge_videos(
    input_files=["video1.mp4", "video2.mp4"],
    reduction_factor=0.5,
    output_file="output.mp4"
)
```
feishu-logging-handler 1.0.8
logging的飞书handler
Requires Python: >=3

# feishu-logging-handler
通过webhook将自定义服务的消息推送至飞书

## 更新记录
- 1.0.7 增加了普通错误的简化输出，便于阅读。支持simple_log_levelno和simple_format
- 1.0.6 修复了bug、stack_info并且可以换行输出
- 1.0.5 增加stack_info的支持
- 1.0.5 增加了error不是str的支持(特别是try except的时候)


特点：
- 异步有可能会遇到loop已释放的问题，调整为同步。启用多线程，所以性能ok
- 增加缓存支持，重复消息设置一个时间周期，不会重复发送
- 支持 filter_key 来过滤部分error的key

# 安装
pip install feishu-logging-handler -i https://pypi.org/simple

# 配置
- 创建一个飞书群组
- 点击群设置，添加一个机器人，并生成Webhook地址
- 可以设置关键词过滤


# 使用方式
初始化：
```
from feishu_logging.handler import FeiShuWebhookHandler
log_feishu = logging.getLogger("feishu")
http_handler = FeiShuWebhookHandler("https://open.feishu.cn/open-apis/bot/v2/hook/xxx","key_word",cache_time=10,filter_key=["funcName","msg","levelname","args","pathname","lineno","threadName","stack_info"]) # cache_time = 0为不启用cache,cache_time单位为秒
http_handler.setLevel(logging.DEBUG)
log_feishu.addHandler(http_handler)
```

```
注意是否会初始化多次 addHandler 如果多次会请求多次
if not log_feishu.handlers:
    http_handler = FeiShuWebhookHandler("https://open.feishu.cn/open-apis/bot/v2/hook/xxx","key_word",cache_time=10,filter_key=["funcName","msg","levelname","args","pathname","lineno","threadName","stack_info"]) # cache_time = 0为不启用cache
    http_handler.setLevel(logging.DEBUG)
    log_feishu.addHandler(http_handler)
```

写日志:
```
log_feishu = logging.getLogger("feishu")
log_feishu.error("错误测试")
```

填入Webhook地址和关键词（或项目名称）即可