Skip to content

Instantly share code, notes, and snippets.

@OrDuan
Created June 18, 2017 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OrDuan/a37fddc4e82ea8f5050cce53493b6f92 to your computer and use it in GitHub Desktop.
Save OrDuan/a37fddc4e82ea8f5050cce53493b6f92 to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
payload = {
'number': '3845',
'letter': '*',
'submitBtn': '',
}
response = requests.post(url='http://minmsakar.com/', data=payload)
bs = BeautifulSoup(response.text, 'html.parser')
table = bs.select('table')[1].select('tr')
for tr in table:
td = tr.select('td')
print(td[0].text.strip(), '-', td[1].text.strip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment