Skip to main content

python program to Print Starting Series OF Indian Mobile Number for a State or operator or both

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")



 

Comments

  1. Your Affiliate Money Printing Machine is ready -

    And 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

    ReplyDelete
  2. If you're looking to lose kilograms then you certainly need to try this totally brand new personalized keto meal plan.

    To 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.

    ReplyDelete

Post a Comment

share your thoughts ....

Popular posts from this blog

Dragon Age: Inquisition Digital Deluxe Edition + All DLCs (torrent) Repack Size: 20.1~23.9 GB

Brief : Dragon Age: Inquisition  is an  action role-playing video game  developed by  Bioware Edmonton  and published by  Electronic Arts . The third major game in the  Dragon Age  franchise,  Dragon Age: Inquisition  is the sequel to  Dragon Age: Origins  and  Dragon Age II . The game was released worldwide in November 2014 for  Microsoft Windows ,  PlayStation 3 ,  PlayStation 4 ,  Xbox 360 , and  Xbox One . Repack Size: 20.1~23.9 GB 

Download pocket tank delux with 295 weapons free total 295 weapons version 1.6

Download Pocket Tanks Deluxe Full Version Free With 295 Weapons Pack | Size: 30MB UPDATED 2019 /19/april Description: Pocket Tanks is a 1-2 player computer game for Windows and Mac OS X, created by Blitwise Productions, developer of Super DX-Ball and Neon Wars. Adapted from Michael Welch's earlier Amiga game Scorched Tanks, this newer version features modified physics, dozens of weapons ranging from simple explosive shells to homing missiles, and the ability to move the tank. It supports several expansion packs. At the moment, players can have up to 295 different weapons total. Pocket Tanks is often abbreviated as PTanks. Have Fun! NOTE: FILE NAME IS SCRAMBLED FOR AVOIDING HARD DETECTION & FILE TAKEN DOWN . How to Play: Best with 2 players on the same computer at school or at work. UPDATED LINK https://mirr.re/d/u1Y https://nl26.seedr.cc/ff_get/447027537/ptd16.295.exe?st=lUp-PbRp4YOwToHIOGwStQ&e=1555747979 http://www.uploadmagnet.com/7gfzhbyfe

What Are Search Engine Spiders?

A spider, also known as a robot or a crawler, is actually just a program that follows, or "crawls", links throughout the Internet, grabbing content from sites and adding it to search engine indexes. Spiders only can follow links from one page to another and from one site to another. That is the primary reason why links to your site (inbound links) are so important. Links to your website from other websites will give the search engine spiders more "food" to chew on. The more times they find links to your site, the more times they will stop by and visit. Google especially relies on its spiders to create their vast index of listings. Spiders find Web pages by following links from other Web pages, but you can also submit your Web pages directly to a search engine or directory and request a visit by their spider. In fact, it's a good idea to manually submit your site to a human-edited directory such as Yahoo, and usually spiders from other search e

How to Create Your Own Customized Run Commands

The Run command on Microsoft Windows operating system allows you to directly open an application or document with just a single command instead of navigating to it’s location and double-clicking the executable icon. However, it only works for some of the inbuilt Windows programs such as Command prompt (cmd), Calculator (calc) etc. So, have you ever wondered how to create your own customized Run commands for accessing your favorite programs, files and folders? Well, read on to find out the answer. Creating the Customized Run Command: Let me take up an example of how to create a customized run command for opening the Internet explorer. Once you create this command, you should be able to open the Internet explorer just by typing ie in the Run dialog box. Here is how you can do that. Right-click on your Desktop and select New -> Shortcut. You will see a “Create Shortcut” Dialog box as shown below Click on “Browse”, navigate to: Program Files -> Internet Explorer from y

8 Tools to Track Registry and File Changes by installing a software

1.  Regshot unicode Regshot is a long running utility that can quickly take a before and after snapshot of the system registry. Also in the more recent unicode version it’s gained the ability to monitor for file changes using CRC32 and MD5 file checksums although this function is turned off by default and you have to go to File -> Options -> Common Options -> and tick “Check files in the specified folders” to enable it. Only the Windows folder is entered into the list of watched folders so you have to enter any others yourself through the Folders tab. This version also added the Connect to remote registry option. Regshot is very much a “hands on” utility and is more for experienced or advanced users to quickly check for system changes between two different points in time. Simply create the 1st shot, install the software or run the program you want to watch, and then press 2nd shot. After comparing the differences in the 1st and 2nd shots, it will open an HTML log in y

QWERTY-keyboard when this idean came

QWERTY QWERTY   / ˈ k w ɜr t i /  is the most common modern-day  keyboard layout . The name comes from the first six  keys  appearing on the top left letter row of the keyboard and read from left to right: Q-W-E-R-T-Y. The QWERTY design is based on a layout created for the  Sholes and Glidden typewriter  and sold to  Remington  in 1873. It became popular with the success of the Remington No. 2 of 1878, and remains in use on electronic keyboards due to the  network effect  of a standard layout and a belief that  alternatives  fail to provide very significant advantages. [ 1 ]  The use and adoption of the QWERTY keyboard is often viewed as one of the most important case studies in  open standards  because of the widespread, collective adoption and use of the product. [ 2 ] History and purposes [ edit ] Keys are arranged on diagonal columns, to give space for the levers. Main article:  Sholes and Glidden typewriter Still used to this day, the QWERTY layout was devised

Error:(1, 0) Plugin with id 'com.android.application' not found

just add the following code to your top level build.gradle  {note by top level build.gradle i means that if you open that build.gradle you will see a comment like this // Top-level build file where you can add configuration options common to all sub-projects/modules. add the following code  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:0.12.+' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! and click on sync now ..it will do the rest..

Windows 10 1703 Fall Creator update/upgrage brings NEW UI ... the fluent Ui

Microsoft is planning to implement these subtle design changes gradually. Some are already available in new updates to existing Windows 10 apps, and more will start to appear in Windows itself as Microsoft updates the operating system with the Fall Creators Update and future updates. "It's going to be a journey," says Microsoft director Aaron Woodman, noting that these design changes will appear over time in Windows and other products. On stage at Build today, Microsoft's Joe Belfiore demonstrated a number of Fluent Design changes. "You're going to see Fluent Design show up in the Windows shell, in our apps, and across devices," explains Joe Belfiore. Microsoft is focusing on light, depth, motion, material, and scale for its Fluent Design, with subtle changes that make the design feel like it's moving during interactions in Windows. An inking demo showed how Microsoft is bringing the pen experience across the entirety of Windows, allowing