ユーザーが値を入力した後、通貨交換値を抽出しようとしています。Worldremit.com にはカテゴリ別の為替レートがあります。たとえば、ユーロから INR、0 から 500 ユーロには 1 つの為替レート、500 から 1000 ユーロには 1 つの為替レートがあります。
要件: 為替レートを追跡し、為替レートが特定の値に達したときにメールを送信します (後で Google サーバーから Python コードを実行する予定です)
Python コード
import requests
from icecream import ic
from bs4 import BeautifulSoup
URL = "https://www.worldremit.com/en?selectfrom=de&ds_rl=1262314&ds_rl=1262326&ds_rl=1262314&gclid=CjwKCAiA_omPBhBBEiwAcg7smfiUbgpbl_SRSOvS6QqjrqZ9zNFgx22VvTVJrdG0ddnQjeSZ0ve05RoCEskQAvD_BwE&gclsrc=aw.ds&transfer=bnk&selectto=in&amountfrom=100.00¤cyto=inr¤cyfrom=eur"
headers = {"User-Agent" : <enter/your/user/agent/here>}
# to get the page from a URL with a header
page = requests.get(URL, headers=headers)
# to get the content from a page and parse it use beatifulsoup
soup = BeautifulSoup(page.content, 'html.parser')
div = soup.find('div', {'id': 'receive'}).find('div', {'class':'MuiInputBase-root-300 MuiInputBase-colorSecondary-306 jss292'})
#print
ic(div)
問題: 出力が 100 しか表示されません。ユーザーが 1000 ユーロなどの特定の値を入力した後に値を取得する方法。
Edit1: ウェブサイトの検査では正確に表示されますが、私の出力は入力に関係なく常に 100 です。
ありがとうパヴァン