python - Calculation of age of domain by passing value in URL using POST method -


i want calculate domain age of several website http://www.webconfs.com/domain-age.php passing variable in url http://www.webconfs.com/domain-age.php?domains=youtube.com.

the problem in form tag of site, using post method, in python code, whether append domain name or not returns same web page.

how can pass value of different website url , result web page?

you can use requests making post request , beautifulsoup html parser getting age form html page:

>>> import requests >>> bs4 import beautifulsoup >>> import re >>> url = "http://www.webconfs.com/domain-age.php" >>> domain = 'youtube.com'  >>> r = requests.post(url, {'domains': domain, 'submit': 'submit'}) >>> soup = beautifulsoup(r.content) >>> item in soup.find_all('a', href=re.compile('website-history')): ...     print item.text ...  9 years 0 months old 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -