import requests import urllib.request import time from bs4 import BeautifulSoup as bs import re url =' https://en.wikipedia.org/wiki/Mobile_telephone_numbering_in_India' state_to_extract="UE" #if set to None all state is considered telecom_to_extracted=None #if set to none all operator from particular city is extracted response = requests.get(url) print(response) soup = bs(response.text,"html.parser") one_a_tag = soup.findAll('tr')[35:] lst=[] for k in one_a_tag: s=k.findAll('td') limit=len(s) i=0 while True: if i==limit: break no=s[i].text i+=1 if i==limit: break operator=s[i].text i+=1 if i==limit: break state=s[i].text i+=1 if i==limit: break res=f"{no} {operator} {state}" if state_to_extract is None : if telecom_to_extracted is None: lst.append(no) elif telecom_to_extracted in res: lst.append(no) else: print("please specify either state or operator or both") input() break elif state_to_extract in res: if telecom_to_extracted is None: lst.append(no) elif telecom_to_extracted in res : lst.append(no) #inteded operator of intended state found else: pass #currently not the intended operator else: pass #currently not the desired State... print(res) print("-"*20) print(lst) stateName="india" if state_to_extract==None else state_to_extract opName="all_operator" if telecom_to_extracted==None else telecom_to_extracted filename=f"{stateName}__{opName}.txt" with open(filename,"w") as f: for z in lst: print(f"writing {z} to file") f.write(z) f.write("\n")
Definition of 3G: 3G is the third generation of wireless technologies. It comes with enhancements over previous wireless technologies, like high-speed transmission, advanced multimedia access and global roaming. 3G is mostly used with mobile phones and handsets as a means to connect the phone to the Internet or other IP networks in order to make voice and video calls, to download and upload data and to surf the net. How is 3G Better?: 3G has the following enhancements over 2.5G and previous networks: Several times higher data speed; Enhanced audio and video streaming; Video-conferencing support; Web and WAP browsing at higher speeds; IPTV (TV through the Internet) support. 3G Technical Specifications: The transfer rate for 3G networks is between 128 and 144 kbps (kilobits per second) for devices that are moving fast and 384 kbps for slow ones(like for pedestrians). For fixed wireless LANs, the speed goes beyond 2 Mbps. 3G is a set of technologies and stand
Your Affiliate Money Printing Machine is ready -
ReplyDeleteAnd getting it running is as simple as 1---2---3!
Here is how it all works...
STEP 1. Tell the system what affiliate products the system will promote
STEP 2. Add PUSH button traffic (it ONLY takes 2 minutes)
STEP 3. Watch the system explode your list and upsell your affiliate products all for you!
Are you ready to start making money??
Click here to activate the system
If you're looking to lose kilograms then you certainly need to try this totally brand new personalized keto meal plan.
ReplyDeleteTo create this service, licensed nutritionists, personal trainers, and chefs joined together to produce keto meal plans that are useful, decent, money-efficient, and fun.
Since their grand opening in early 2019, thousands of individuals have already remodeled their body and well-being with the benefits a certified keto meal plan can offer.
Speaking of benefits: in this link, you'll discover eight scientifically-certified ones offered by the keto meal plan.