import requests
import pandas as pd
from bs4 import BeautifulSoup
def getdata(url):
r=requests.get(url)
return r.text
# Enter your own API key
api = 'YOUR API KEY'
number = '9876543210'
country = 'IN'
# pass Your API, number and country code
htmldata=getdata('http://apilayer.net/api/validate?access_key='+api+'&number='+number+'&country_code='+country+'&format=1')
soup = BeautifulSoup(htmldata, 'html.parser')
print(soup)
No comments:
Post a Comment