Fiicen-py


NameFiicen-py JSON
Version 1.3.1 PyPI version JSON
download
home_pagehttps://github.com/taka-4602/Fiicen-py
SummaryFiicenというSNSに使えるAPIラッパー
upload_time2024-06-07 03:13:22
maintainerNone
docs_urlNone
authortaka4602
requires_python>=3.6
licenseNone
keywords fiicen
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Fiicen-py
[Fiicen](https://fiicen.jp/)というSNSに使えるAPIラッパー
### >>```pip install fiicen-py```<<  
## 必須モジュール  
- requests
- bs4
#### アカウントジェネレーターを使う場合  
- selenium
## 使い方  
#### example.py
```py
from fiicen_py import Fiicen

fiicen=Fiicen(name="ユーザー名",password="パスワード")#ログイン、nameとpasswordを設定しなかったらログインをスキップします
print(fiicen.fly_circle(contents="メインの文章",vote_choices1="投票の選択肢1",vote_choices2="投票の選択肢2"))#リプライをつける時は circle_id="リプするサークルID"
print(fiicen.change_profile(display_name="表示名",introduce="自己紹介"))
print(fiicen.follow(followed_id="ユーザーID"))#ユーザーIDの取得方法がリクエスト見るしかなさそうなので使い道ナシ?
print(fiicen.get_topic())#タイムラインをhtmlで取得する
print(fiicen.notification())#通知の数をintで返す
print(fiicen.like(circle_id="サークルID"))#いいね!
print(fiicen.refly(circle_id="サークルID"))#リフライ
print(fiicen.fix_circle(circle_id="サークルID"))#プロフィールにサークルを固定
print(fiicen.report(circle_id="サークルID",type="通報理由"))#サークルを通報、理由は:harassment / sensitive / spam / suicide / spoofing / privacy / violence / misinformation / discrimination から選ぶ
print(fiicen.vote(circle_id="サークルID",choices_id="投票の選択肢のID"))#投票する

fiicen=Fiicen()#アカウント作成の時はログインをスキップ
print(fiicen.create_account(name="ユーザー名",display_name="表示名",password="パスワード"))
print(fiicen.check_account_name(name="ユーザー名"))#ユーザー名が使用されているかどうか確認する...使いどころは不明
```
使い方は#コメントに書いてある通りで、それ以上はなにもないです  
返される値もステータスコードくらいで重要なものはありません  
### 返される値  
```.fly_circle()``` / ```.change_profile()``` / ```.follow()``` / ```.create_account()``` / ```.like()``` / ```.refly()``` / ```.report()``` 
- **ステータスコード**  
  言わずもがな200が成功、それ以外はエラーになる  

```get_topic()``` 
- **html**  
  bs4などで要素を抽出する必要アリ

```.check_account_name()```
- **bool**  
  ```True``` or ```False```

```.fix_circle()```
- **dict**  
  ```{result: "fixed"}``` or ```{result: "unfixed"}```

```.notification()```
- **int**  
  ```0,1,2,3,4,5,6......```

```.vote()```
- **dict**  
  ```{result:"liked"}```
## アカウントジェネレーター  
#### fiicen_gen.py
```py
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from fiicen_py import Fiicen

options = webdriver.ChromeOptions()
options.add_argument('--headless')
#options.add_argument('--proxy-server=http://IP.ア.ドレ.ス:ポート')#プロキシを設定する
driver = webdriver.Chrome(options=options)

def account_gen(account_name:str,display_name:str,password:str):
    try:
        driver.get('https://fiicen.jp/login/')#reCaptha追加されてるのにこのリクエストがないとcsrftokenが生成されないやばいバグが修正されてない (5/22)
        #sleep(1)
        driver.get('https://fiicen.jp/signup/')
        sleep(1)
        try:
            account_name_input=driver.find_element(By.ID,"account_name")
        except:
            sleep(2)
            account_name_input=driver.find_element(By.ID,"account_name")
        account_name_input.send_keys(account_name)
        driver.find_element(By.XPATH, '//*[@onclick="openSignupPage(1, 2);"]').click()
        sleep(1)
        account_display_name_input=driver.find_element(By.ID,"display_name")
        account_display_name_input.send_keys(display_name)
        driver.find_element(By.XPATH, '//*[@onclick="openSignupPage(2, 3);"]').click()
        sleep(1)
        password_input=driver.find_element(By.ID,"password")
        password_input.send_keys(password)
        driver.find_element(By.XPATH, '//*[@onclick="openSignupPage(3, 4);"]').click()
        sleep(1)
        driver.find_element(By.XPATH, '//*[@onclick="openSignupPage(4, 5);"]').click()
        sleep(1)
        driver.find_element(By.XPATH, '//*[@onclick="openSignupPage(5, 6), submitSignup()"]').click()
        sleep(1)
        driver.delete_all_cookies()
        Fiicen(account_name,password)
        return "OK"
    except:
        return "Failed"

print(account_gen("ユーザー名","表示名","パスワード"))
```  
5/22の夜にアカウント生成だけreCaptcha(v2)が必須になったみたいなので、ヘッドレスブラウザーでアカウントを作成するジェネレーターを作りました  
無料でキャプチャーを突破するのはこうするしかないと思います  
有料ソルバー使うってあなたはそもそもラッパー必要ないでしょ!🫵
## コンタクト
Discord サーバー / https://discord.gg/aSyaAK7Ktm  
Discord ユーザー名 / .taka.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/taka-4602/Fiicen-py",
    "name": "Fiicen-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "fiicen",
    "author": "taka4602",
    "author_email": "shun4602@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f3/82/80d68adc6d9d620fcdfa7b58060cc68b8be276ee78ab8ebd8c1b1d68724b/Fiicen-py-1.3.1.tar.gz",
    "platform": null,
    "description": "# Fiicen-py\r\n[Fiicen](https://fiicen.jp/)\u3068\u3044\u3046SNS\u306b\u4f7f\u3048\u308bAPI\u30e9\u30c3\u30d1\u30fc\r\n### >>```pip install fiicen-py```<<  \r\n## \u5fc5\u9808\u30e2\u30b8\u30e5\u30fc\u30eb  \r\n- requests\r\n- bs4\r\n#### \u30a2\u30ab\u30a6\u30f3\u30c8\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u3092\u4f7f\u3046\u5834\u5408  \r\n- selenium\r\n## \u4f7f\u3044\u65b9  \r\n#### example.py\r\n```py\r\nfrom fiicen_py import Fiicen\r\n\r\nfiicen=Fiicen(name=\"\u30e6\u30fc\u30b6\u30fc\u540d\",password=\"\u30d1\u30b9\u30ef\u30fc\u30c9\")#\u30ed\u30b0\u30a4\u30f3\u3001name\u3068password\u3092\u8a2d\u5b9a\u3057\u306a\u304b\u3063\u305f\u3089\u30ed\u30b0\u30a4\u30f3\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\r\nprint(fiicen.fly_circle(contents=\"\u30e1\u30a4\u30f3\u306e\u6587\u7ae0\",vote_choices1=\"\u6295\u7968\u306e\u9078\u629e\u80a21\",vote_choices2=\"\u6295\u7968\u306e\u9078\u629e\u80a22\"))#\u30ea\u30d7\u30e9\u30a4\u3092\u3064\u3051\u308b\u6642\u306f circle_id=\"\u30ea\u30d7\u3059\u308b\u30b5\u30fc\u30af\u30ebID\"\r\nprint(fiicen.change_profile(display_name=\"\u8868\u793a\u540d\",introduce=\"\u81ea\u5df1\u7d39\u4ecb\"))\r\nprint(fiicen.follow(followed_id=\"\u30e6\u30fc\u30b6\u30fcID\"))#\u30e6\u30fc\u30b6\u30fcID\u306e\u53d6\u5f97\u65b9\u6cd5\u304c\u30ea\u30af\u30a8\u30b9\u30c8\u898b\u308b\u3057\u304b\u306a\u3055\u305d\u3046\u306a\u306e\u3067\u4f7f\u3044\u9053\u30ca\u30b7\uff1f\r\nprint(fiicen.get_topic())#\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3\u3092html\u3067\u53d6\u5f97\u3059\u308b\r\nprint(fiicen.notification())#\u901a\u77e5\u306e\u6570\u3092int\u3067\u8fd4\u3059\r\nprint(fiicen.like(circle_id=\"\u30b5\u30fc\u30af\u30ebID\"))#\u3044\u3044\u306d\uff01\r\nprint(fiicen.refly(circle_id=\"\u30b5\u30fc\u30af\u30ebID\"))#\u30ea\u30d5\u30e9\u30a4\r\nprint(fiicen.fix_circle(circle_id=\"\u30b5\u30fc\u30af\u30ebID\"))#\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u306b\u30b5\u30fc\u30af\u30eb\u3092\u56fa\u5b9a\r\nprint(fiicen.report(circle_id=\"\u30b5\u30fc\u30af\u30ebID\",type=\"\u901a\u5831\u7406\u7531\"))#\u30b5\u30fc\u30af\u30eb\u3092\u901a\u5831\u3001\u7406\u7531\u306f\uff1aharassment / sensitive / spam / suicide / spoofing / privacy / violence / misinformation / discrimination \u304b\u3089\u9078\u3076\r\nprint(fiicen.vote(circle_id=\"\u30b5\u30fc\u30af\u30ebID\",choices_id=\"\u6295\u7968\u306e\u9078\u629e\u80a2\u306eID\"))#\u6295\u7968\u3059\u308b\r\n\r\nfiicen=Fiicen()#\u30a2\u30ab\u30a6\u30f3\u30c8\u4f5c\u6210\u306e\u6642\u306f\u30ed\u30b0\u30a4\u30f3\u3092\u30b9\u30ad\u30c3\u30d7\r\nprint(fiicen.create_account(name=\"\u30e6\u30fc\u30b6\u30fc\u540d\",display_name=\"\u8868\u793a\u540d\",password=\"\u30d1\u30b9\u30ef\u30fc\u30c9\"))\r\nprint(fiicen.check_account_name(name=\"\u30e6\u30fc\u30b6\u30fc\u540d\"))#\u30e6\u30fc\u30b6\u30fc\u540d\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3059\u308b...\u4f7f\u3044\u3069\u3053\u308d\u306f\u4e0d\u660e\r\n```\r\n\u4f7f\u3044\u65b9\u306f#\u30b3\u30e1\u30f3\u30c8\u306b\u66f8\u3044\u3066\u3042\u308b\u901a\u308a\u3067\u3001\u305d\u308c\u4ee5\u4e0a\u306f\u306a\u306b\u3082\u306a\u3044\u3067\u3059  \r\n\u8fd4\u3055\u308c\u308b\u5024\u3082\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\u304f\u3089\u3044\u3067\u91cd\u8981\u306a\u3082\u306e\u306f\u3042\u308a\u307e\u305b\u3093  \r\n### \u8fd4\u3055\u308c\u308b\u5024  \r\n```.fly_circle()``` / ```.change_profile()``` / ```.follow()``` / ```.create_account()``` / ```.like()``` / ```.refly()``` / ```.report()``` \r\n- **\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9**  \r\n  \u8a00\u308f\u305a\u3082\u304c\u306a200\u304c\u6210\u529f\u3001\u305d\u308c\u4ee5\u5916\u306f\u30a8\u30e9\u30fc\u306b\u306a\u308b  \r\n\r\n```get_topic()``` \r\n- **html**  \r\n  bs4\u306a\u3069\u3067\u8981\u7d20\u3092\u62bd\u51fa\u3059\u308b\u5fc5\u8981\u30a2\u30ea\r\n\r\n```.check_account_name()```\r\n- **bool**  \r\n  ```True``` or ```False```\r\n\r\n```.fix_circle()```\r\n- **dict**  \r\n  ```{result: \"fixed\"}``` or ```{result: \"unfixed\"}```\r\n\r\n```.notification()```\r\n- **int**  \r\n  ```0,1,2,3,4,5,6......```\r\n\r\n```.vote()```\r\n- **dict**  \r\n  ```{result:\"liked\"}```\r\n## \u30a2\u30ab\u30a6\u30f3\u30c8\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc  \r\n#### fiicen_gen.py\r\n```py\r\nfrom selenium import webdriver\r\nfrom selenium.webdriver.common.by import By\r\nfrom time import sleep\r\nfrom fiicen_py import Fiicen\r\n\r\noptions = webdriver.ChromeOptions()\r\noptions.add_argument('--headless')\r\n#options.add_argument('--proxy-server=http://IP.\u30a2.\u30c9\u30ec.\u30b9:\u30dd\u30fc\u30c8')#\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3059\u308b\r\ndriver = webdriver.Chrome(options=options)\r\n\r\ndef account_gen(account_name:str,display_name:str,password:str):\r\n    try:\r\n        driver.get('https://fiicen.jp/login/')#reCaptha\u8ffd\u52a0\u3055\u308c\u3066\u308b\u306e\u306b\u3053\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u306a\u3044\u3068csrftoken\u304c\u751f\u6210\u3055\u308c\u306a\u3044\u3084\u3070\u3044\u30d0\u30b0\u304c\u4fee\u6b63\u3055\u308c\u3066\u306a\u3044 (5/22)\r\n        #sleep(1)\r\n        driver.get('https://fiicen.jp/signup/')\r\n        sleep(1)\r\n        try:\r\n            account_name_input=driver.find_element(By.ID,\"account_name\")\r\n        except:\r\n            sleep(2)\r\n            account_name_input=driver.find_element(By.ID,\"account_name\")\r\n        account_name_input.send_keys(account_name)\r\n        driver.find_element(By.XPATH, '//*[@onclick=\"openSignupPage(1, 2);\"]').click()\r\n        sleep(1)\r\n        account_display_name_input=driver.find_element(By.ID,\"display_name\")\r\n        account_display_name_input.send_keys(display_name)\r\n        driver.find_element(By.XPATH, '//*[@onclick=\"openSignupPage(2, 3);\"]').click()\r\n        sleep(1)\r\n        password_input=driver.find_element(By.ID,\"password\")\r\n        password_input.send_keys(password)\r\n        driver.find_element(By.XPATH, '//*[@onclick=\"openSignupPage(3, 4);\"]').click()\r\n        sleep(1)\r\n        driver.find_element(By.XPATH, '//*[@onclick=\"openSignupPage(4, 5);\"]').click()\r\n        sleep(1)\r\n        driver.find_element(By.XPATH, '//*[@onclick=\"openSignupPage(5, 6), submitSignup()\"]').click()\r\n        sleep(1)\r\n        driver.delete_all_cookies()\r\n        Fiicen(account_name,password)\r\n        return \"OK\"\r\n    except:\r\n        return \"Failed\"\r\n\r\nprint(account_gen(\"\u30e6\u30fc\u30b6\u30fc\u540d\",\"\u8868\u793a\u540d\",\"\u30d1\u30b9\u30ef\u30fc\u30c9\"))\r\n```  \r\n5/22\u306e\u591c\u306b\u30a2\u30ab\u30a6\u30f3\u30c8\u751f\u6210\u3060\u3051reCaptcha(v2)\u304c\u5fc5\u9808\u306b\u306a\u3063\u305f\u307f\u305f\u3044\u306a\u306e\u3067\u3001\u30d8\u30c3\u30c9\u30ec\u30b9\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u3092\u4f5c\u308a\u307e\u3057\u305f  \r\n\u7121\u6599\u3067\u30ad\u30e3\u30d7\u30c1\u30e3\u30fc\u3092\u7a81\u7834\u3059\u308b\u306e\u306f\u3053\u3046\u3059\u308b\u3057\u304b\u306a\u3044\u3068\u601d\u3044\u307e\u3059  \r\n\u6709\u6599\u30bd\u30eb\u30d0\u30fc\u4f7f\u3046\u3063\u3066\u3042\u306a\u305f\u306f\u305d\u3082\u305d\u3082\u30e9\u30c3\u30d1\u30fc\u5fc5\u8981\u306a\u3044\u3067\u3057\u3087\uff01\ud83e\udef5\r\n## \u30b3\u30f3\u30bf\u30af\u30c8\r\nDiscord \u30b5\u30fc\u30d0\u30fc / https://discord.gg/aSyaAK7Ktm  \r\nDiscord \u30e6\u30fc\u30b6\u30fc\u540d / .taka.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Fiicen\u3068\u3044\u3046SNS\u306b\u4f7f\u3048\u308bAPI\u30e9\u30c3\u30d1\u30fc",
    "version": "1.3.1",
    "project_urls": {
        "Homepage": "https://github.com/taka-4602/Fiicen-py"
    },
    "split_keywords": [
        "fiicen"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f38280d68adc6d9d620fcdfa7b58060cc68b8be276ee78ab8ebd8c1b1d68724b",
                "md5": "f2bee1f988582584517eaf881eb2bde7",
                "sha256": "785d95b9f9ae5ad1d61be015f7a6d73aef425ddec674bdd8be21bebd1c968222"
            },
            "downloads": -1,
            "filename": "Fiicen-py-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f2bee1f988582584517eaf881eb2bde7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5152,
            "upload_time": "2024-06-07T03:13:22",
            "upload_time_iso_8601": "2024-06-07T03:13:22.629000Z",
            "url": "https://files.pythonhosted.org/packages/f3/82/80d68adc6d9d620fcdfa7b58060cc68b8be276ee78ab8ebd8c1b1d68724b/Fiicen-py-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-07 03:13:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "taka-4602",
    "github_project": "Fiicen-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fiicen-py"
}
        
Elapsed time: 0.83819s