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

download Code blocks 13.12 mingw.setup .exe 97 mb

NOTE: A newer version is been updated on the site ... visit here  http://vastgk.blogspot.com/2017/07/download-code-blocks-1601-mingwsetup.html File Date Download from codeblocks-13.12-setup.exe 27 Dec 2013 BerliOS  or  Sourceforge.net codeblocks-13.12mingw-setup.exe 27 Dec 2013 BerliOS  or  Sourceforge.net codeblocks-13.12mingw-setup-TDM-GCC-481.exe 27 Dec 2013 BerliOS  or  Sourceforge.net NOTE : The codeblocks-13.12mingw-setup.exe file  includes  the GCC compiler and GDB debugger from  TDM-GCC  (version 4.7.1, 32 bit). The codeblocks-13.12mingw-setup-TDM-GCC-481.exe file includes the TDM-GCC compiler, version 4.8.1, 32 bit. While v4.7.1 is rock-solid (we use it to compile C::B), v4.8.1 is provided for convenience, there are some known bugs with this version related to the compilation of Code::Blocks itself. IF UNSURE, USE "codeblocks-13.12mingw-setup.exe"!  \ Linux 32-bit: Dis...

Supported OS id and their code in an installer

Hello frnd this is the code and thier Operating system id in windows ,to identify which program run in which windows The ID below indicates application support for Windows Vista -->           --The ID below indicates application support for Windows 7 -->           -The ID below indicates application support for Windows 8 -       supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" code provided to you by Rajlive360.tk

Binary Search Tree in C++( dynamic memory based )

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 #include<bits/stdc++.h> using namespace std; struct bst { int val; bst * left, * right; }; bst * root = nullptr; void srch ( int num,bst * head) { if (head == nullptr){ cout << " \n Number is not present \a " << endl; return ; } if (head -> val == num) { cout << " \n Number is present \n\a " ; return ; } else { if (num < head -> val) srch(num,head -> left); else srch(num,head -> right); ...

Use next and previous post titles as navigation in Blogger

By default, at the end of each Blogger post, we get the "Newer Post" and "Older Post" navigation links. As I have seen in other sites, it looks better if it showed the  next and previous post titles  instead. So in this tutorial, I will show you how to customize your post navigation links so that it will display the titles of your next and previous posts. Replace "Newer Posts" and "Older Posts" with post titles. Before we begin,  backup your template  first or maybe use a  test blog  instead. To backup your template, go to your blog's dashboard then Template » Backup/Restore » Download full template. Step 1. Adding the script. In this step, we will be adding a script to your template. To add the script, go to Layout then click on "Add a Gadget" and select HTML/JavaScript from the list. In the Configure HTML/JavaScript window, leave the Title empty and paste the following code in the Content. I based this code on  BloggerS...

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

SysTracer - Track file and registry changes in your computer

SysTracer - Track file and registry changes in your co About SysTracer Features Download Order & Pricing Awards Technical support © Copy computer SysTracer v2.6: trace your system changes SysTracer is a system utility tool that can scan and analyze your computer to find changed (added, modified or deleted) data into registry and files. SysTracer can scan your system and record information about: changed files and folders modified registry entries installed programs system services system drivers applications that are configured to run at computer startup running processes loaded dlls Each scan operation performed with SysTracer generates a binary image file representing a snapshot of your system. Recording the snapshot usually takes a few minutes depending on your system complexity. You can choose to scan only specific parts from folders or registry, in order to speed up the recording process. By comparing snapshots from ...

Mapel Download : Download mapelsoft Mapel Enggineering Btech CS & IT . DSL Lab

Maplesoft Maple 2016 Final Release is an advanced Math calculation software that provides results in seconds that helps users perform complex mathematical equations with various functions. Practitioners of such related fields as mathematics, engineering or science will soon notice that Maple is an advanced calculator for any of these branches of knowledge. It combines the most powerful spreadsheets with the most intuitive interface computational engine. Maple 2016 Serial Key Features: Maple 2016 is a powerful computational engine, which guarantees accurate results in everything that is a technical calculation. Starting from there, a whole world of possibilities opens. * Tool for simple and complex mathematical operations. * Interface optimized for intuitive handling by users. * Includes all kinds of tools: editors of mathematical equations, symbols, graphs 2D and 3D image recognition, modules etc. Calculation for all: The workflow in Maple develops around t...

SEND FREE ANONYMOUS MESSAGE IN INDIA

As we all know sending free anonymous text message have become very hard and there are very least sites which provide this facility, if they do so they charge heavy money from their customers. Many people didn't like to pay a penny for this. They just want those site which gives them the opportunity to send free and anonymous message to their friends, relative, many more. So this post is really for them, I hope that they will as well as all the people who read this will also like it. The main purpose of sending these messages are: To fool/fraud people To gain money from innocent or illiterate people Or it may be as a joke played to you by your friends, relative, or others How To Send Anonymous Free Messages? There are very very very least sites which provide the facility to send free messages anonymously. But I have found such a site which provide us to send free message anonymously. Features of this site: No Registration or Login required. Send Unlimited 160 Characters Sms. ...

DOWNLOAD CODE BLOCKS 16.01 MINGW.SETUP .EXE 86.3 MB

Code::Blocks for Mac is a free C, C++ and Fortran IDE that has a custom build system and optional Make support. The application has been designed to be very extensible and fully configurable. Code::Blocks is an IDE packed full of all the features you will need. It has a consistent look, feel and operation across its supported platforms. It has been built around a plugin framework, therefore Code::Blocks can be extended with plugins. Support for any kind of functionality can be added by installing/coding a plugin. Key features include: Written in C++. No interpreted languages or proprietary libs needed.. Full plugin support. Multiple compiler support: GCC (MingW / GNU GCC), MSVC++, clang, Digital Mars, Borland C++ 5.5, and Open Watcom etc. Support for parallel builds. Imports Dev-C++ projects. Debugger with full breakpoints support. Cross-platform. Code::Blocks' interface is both customizable and extensible with Syntax highlighting, a tabbed interface, Class Br...

Fix Error 633 /dialup modem fail to connect / USB modem /Broadband/ Windows 10 after Creator 1703 update

Fix Error 633 /dialup modem fail to connect / USB modem /Broadband/ Windows 10 after Creator 1703 update just run this registry editor and it will do the rest ...  download the fix from google drive :  https://drive.google.com/file/d/0BwyIMs3NcEzYWDNzYkN0LVdpa3c/view?usp=sharing this will eliminate all the error of not connecting to internet ... error 633 verified  On OSbuild 15063.0 ..