0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

応募ボタン探し、応募ボタン自動でぽちぃ

Posted at

データを自動送信するには

htmlからidを自動取得

BeautifulSoupとrequest 2つ使う


インスト方法

インスト
pip install beautifulsoup4
pip install lxml

動作確認

sample.py
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time

# WebDriverの設定(Chromeを使用)
driver = webdriver.Chrome()  

# 応募ページを開く
url = "https://example.com/apply"  # ここを実際のURLに変更
driver.get(url)

# ページの読み込み待機
time.sleep(3)

try:
    # 応募ボタンを探す(buttonタグ or input[type="submit"] など)
    apply_button = driver.find_element(By.XPATH, "//button[contains(text(),'応募') or contains(text(),'Apply')]")

    # 応募ボタンをクリック
    apply_button.click()
except Exception as e:
    print("ボタンめよら:", e)

# 数秒待ってから閉じる
time.sleep(5)
driver.quit()

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?