Nov-03-2019, 06:48 AM
Hey there,
I have application which pulls lottery numbers from official website of lottery.
Website allows search previous lottery games by it's date.
I have tried it by using
Could take a look and guide me what I am doing wrong?
I have application which pulls lottery numbers from official website of lottery.
Website allows search previous lottery games by it's date.
I have tried it by using
requestsmodule but after request was sent I still receiving website output before submit.
Could take a look and guide me what I am doing wrong?
from bs4 import BeautifulSoup import requests form = 'form-a4251ea9cfceec0e0003ead731f36e8d' date = "2019-03-02" web_page = 'https://www.lotto.pl/lotto/wyniki-i-wygrane/wyszukaj?' request_id = str.format('data_losowania%5Bdate%5D={0}&op=&form_build_id={1}&form_id=lotto_wyszukaj_form', date.format("yyyy-mm-dd"), form) def import_lotto(): response = requests.get(web_page+request_id) soup = BeautifulSoup(response.content, 'html.parser') print(soup)