{"id":16634491,"url":"https://github.com/fireattack/python-scripts","last_synced_at":"2025-08-10T23:47:55.498Z","repository":{"id":44633045,"uuid":"229423164","full_name":"fireattack/python-scripts","owner":"fireattack","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-15T09:39:31.000Z","size":364,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-17T17:11:12.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fireattack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-12-21T12:17:48.000Z","updated_at":"2024-04-24T09:48:50.049Z","dependencies_parsed_at":"2023-11-06T07:24:05.336Z","dependency_job_id":"152c2405-243e-4559-a892-688a8ddfc6b1","html_url":"https://github.com/fireattack/python-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireattack%2Fpython-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireattack%2Fpython-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireattack%2Fpython-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireattack%2Fpython-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fireattack","download_url":"https://codeload.github.com/fireattack/python-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238937490,"owners_count":19555376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T05:38:38.603Z","updated_at":"2025-08-10T23:47:55.461Z","avatar_url":"https://github.com/fireattack.png","language":"Python","readme":"# python\n\nSome small Python utilities.\n\n## `instalive.py`\n\nInstagram live downloader. Feed in MPD URL (including all the query parameters!) within 24 hour and it can download the full live stream from the beginning.\n\nUsage:\n\n```\nusage: instalive.py [-h] [--action ACTION] [--dir DIR] [--debug] [--quality QUALITY] [--time TIME] [--range RANGE] url\n\nAvailable actions:\n  all      - Download both video and audio, and merge them (default)\n  live     - Download the live stream only\n  video    - Download video only\n  audio    - Download audio only\n  merge    - Merge downloaded video and audio\n  check    - Check the downloaded segments to make sure there is no missing segments\n  manual   - Manually process a specified range (used together with --range)\n  info     - Display downloader object info\n  import:\u003cpath\u003e - Import segments downloaded via N_m3u8DL-RE from a given path\n\npositional arguments:\n  url                   url of mpd\n\noptions:\n  -h, --help            show this help message and exit\n  --action ACTION, -a ACTION\n                        action to perform (default: all)\n  --dir DIR, -d DIR     save path (default: CWD)\n  --debug               debug mode\n  --quality QUALITY, -q QUALITY\n                        manually assign video quality (default: auto)\n  --time TIME, -t TIME  manually assign last t (default: auto)\n  --range RANGE         manually assign range (start,end) for quick iterate test mode\n```\n\n## `oricon.py`\n\nQuickly download all the highest quality pictures from any Oricon news, special or photo article.\n\nUsage:\n\n```\noricon.py https://www.oricon.co.jp/news/2236438/\n```\n\n## `scraper_ameblo_api.py`\n\n[Ameblo](https://ameblo.jp/) (アメーバブログ or アメブロ, Japanese blog service) downloader. Supports images and text.\n\nUsage:\n\nNote: make sure you also downloaded `util.py` file from the same directory.\n\nCLI:\n\n```\nusage: scraper_ameblo_api.py [-h] [--theme THEME] [--output OUTPUT] [--until UNTIL] [--type TYPE] blog_id\n\nDownload ameblo images and texts.\n\npositional arguments:\n  blog_id               ameblo blog id\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --theme THEME         ameblo theme name\n  --output OUTPUT, -o OUTPUT\n                        folder to save images and texts (default: CWD/{blog_id})\n  --until UNTIL         download until this entry id (non-inclusive)\n  --type TYPE           download type (image, text, all)\n```\nAs Python module:\n\n```python\nfrom scraper_ameblo_api import download_all\n\ndownload_all('user_id', save_folder='.', limit=100, download_type='all')\n```\n\n## `scraper_fantia.py`\n\nFantia downloader. Inspired by [dumpia](https://github.com/itskenny0/dumpia).\n\nUsage:\n\n```python\nfrom scraper_fantia import FantiaDownloader\n\nkey = 'your {_session_id}' # copy it from cookie `_session_id` on fantia.jp\nid = 11111 # FC id copied from URL\ndownloader = FantiaDownloader(fanclub=id, output=\".\", key=key)\ndownloader.downloadAll()\n```\n\nOr just download certain post (you can omit fanclub id in this case):\n\n```python\ndownloader = FantiaDownloader(output=\".\", key='your _session_id')\ndownloader.getPostPhotos(12345)\n```\n\n## `scraper_radiko.py`\n\nNote: you need to prepare the JP proxy yourself.\n\nUsage:\n\n```python\nfrom scraper_radiko import RadikoExtractor\n\n# It supports the following formats:\n# http://www.joqr.co.jp/timefree/mss.php\n# http://radiko.jp/share/?sid=QRR\u0026t=20200822260000\n# http://radiko.jp/#!/ts/QRR/20200823020000\n\nurl = 'http://www.joqr.co.jp/timefree/mss.php'\n\ne = RadikoExtractor(url, save_dir='/output')\ne.parse()\n```\n\n## `nico.py`\n\nNico Timeshift downloader. Download both video and comments.\nAlso can download thumbnail from normal video. Downloading for normal video isn't supported (yet).\n\n\n```\npip install browser-cookie3 websocket-client rich python-dateutil pytz requests beautifulsoup4 lxml\n```\n\nThe actual downloading is delegated to [minyami](https://github.com/Last-Order/Minyami) and/or [N_m3u8DL-RE](https://github.com/nilaoda/N_m3u8DL-RE), so make sure you have them installed first.\n\nCLI:\n\n```\nusage: nico.py [-h] [--verbose] [--info] [--dump] [--thumb] [--cookies COOKIES] [--comments {yes,no,only}] [--proxy PROXY] [--save-dir SAVE_DIR] [--reserve] url\n\npositional arguments:\n  url                   URL or ID of nicovideo webpage\n\noptions:\n  -h, --help            show this help message and exit\n  --verbose, -v         Print verbose info for debugging.\n  --info, -i            Print info only.\n  --dump                Dump all the metadata to json files.\n  --thumb               Download thumbnail only. Only works for video type (not live type).\n  --cookies COOKIES, -c COOKIES\n                        Cookie source.\n                        Provide either:\n                          - A browser name to fetch from;\n                          - The value of \"user_session\";\n                          - A Netscape-style cookie file.\n  --comments {yes,no,only}, -d {yes,no,only}\n                        Control if comments (danmaku) are downloaded. [Default: no]\n  --proxy PROXY         Specify a proxy, \"none\", or \"auto\" (automatically detects system proxy settings). [Default: auto]\n  --save-dir SAVE_DIR, -o SAVE_DIR\n                        Specify the directory to save the downloaded files. [Default: current directory]\n  --reserve             Automatically reserve timeshift ticket if not reserved yet. [Default: no]\n```\n\n## `util.py`\n\nSome utility functions mainly for myself. Read the code to get the idea.\n\nSome highlights:\n\n* download - a generic downloader\n* format_str - format a string to certain width and alignment. Supports wide characters like Chinese and Japanese.\n* compare_obj - recursively compare two objects.\n* Table - a simple table class.\n* parse_to_shortdate - parse a date string to a short date string ('%y%m%d'). Supports more East Asian language formats than `dateutil.parser`.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireattack%2Fpython-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffireattack%2Fpython-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireattack%2Fpython-scripts/lists"}