helper.webFileList module

webファイルリストのヘルパー

課題

  • docstringを整える

class helper.webFileList.WebFileList(value_object: WebFileListValue = None, start_ext: str = '.jpg', download_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../download', work_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../work', archive_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../archive')[ソース]

ベースクラス: object

webファイルリスト

archive_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../archive'
delete_local_files()[ソース]

ファイルリストのファイルについて、ローカルから削除する :return: None

delete_local_folder()[ソース]

ファイルリストのローカルファイルをフォルダごと削除する :return: None

download_chrome_driver()[ソース]

selenium chromeDriverを用いて、画像をデフォルトダウンロードフォルダにダウンロードして、指定のフォルダに移動する :return:

download_irvine()[ソース]

irvineを用いて、ファイルリストをダウンロードする :return:

download_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../download'
download_requests()[ソース]

requestsを用いて、ファイルリストをダウンロードする :return:

static flatten_zip(zip_filepath, output_filepath)[ソース]

zip ファイル内のフォルダを削除し、すべてのファイルをルートに移動した新しい zip ファイルを作成します。 :param: zip_filepath: 処理対象の zip ファイルのパス :param: output_filepath: 出力先の zip ファイルのパス :return: なし

get_download_path_from_1st_element()[ソース]

ファイルリストの一つ目に登録されているダウンロードパスを得る :return: str

get_file_name_list()[ソース]

ファイル名のリストを得る :return: list[str]

get_only_file_name_of_file_not_exist()[ソース]

ローカルにファイルがないファイル名だけのリストを得る :return: list[str]

get_only_url_of_file_not_exist()[ソース]

ローカルにファイルがないURLだけのリストを得る :return: list[str]

get_path_list()[ソース]

ファイルパスのリストを得る :return: list[str]

get_url_list()[ソース]

URLのリストを得る :return: list[str]

get_web_file_list()[ソース]

webファイルリストを得る :return: list[WebFile]

is_exist()[ソース]

ファイルリストの全ファイルがローカルに存在する :return: bool 全てのファイルが存在すればTrueを返す

make_zip_file()[ソース]

ファイルリストのファイルについて、一つの圧縮ファイルにする 圧縮ファイルが既に存在する場合は変名してから圧縮する :return: bool 成功/失敗=True/False

move(new_path)[ソース]

ファイルリストのローカルファイルを移動する :param new_path: 移動先のフォルダーパス :return:

rename_filenames()[ソース]

ファイルリストの各ファイルについて、ローカルに存在するファイルのファイル名をナンバリングファイル名に変更し、ファイルリストを更新する :return: bool 成功/失敗=True/False

rename_url_ext_shift()[ソース]

ファイルリストの各ファイルについて、ローカルに存在しないファイルの拡張子をシフトし、ファイルリストを更新する :return: None

rename_zip_file(zip_filename)[ソース]

圧縮ファイルの名前を付けなおす :param zip_filename: str 付け直すファイル名(禁則文字は削除される) :return: bool 成功/失敗=True/False

start_ext: str = '.jpg'
update_value_object_by_deployment_url_list()[ソース]

ナンバリングされた末尾画像URL一つの時、全体のURLリストを生成してvalue_objectを再生成する :return: bool 処理の実施/未実施

value_object: WebFileListValue = None
work_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../work'
class helper.webFileList.WebFileListValue(web_file_list: list = None, work_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../work', archive_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../archive')[ソース]

ベースクラス: object

値オブジェクト

archive_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../archive'
web_file_list: list = None
work_path: str = 'D:/git/igaponr/training/python/Web_scraping/helper/../work'