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")
1. go to blogger dashboard, select template and edit html. 2. search for </head> to add script. - you may download and upload to your site, or just use this link (no download required) script <script src='http://docs.google.com/uc?id=0B7xJbTAja8i0a0ZJbXJ2TkkwSW8&export=download' type='text/javascript'/> 2. search for ]]></b:skin> to add style/css. img.label_thumb{ float:left; padding:5px; border:1px solid #8f8f8f; background:#D2D0D0; margin-right:10px; height:55px; width:55px; } img.label_thumb:hover{ background:#f7f6f6; } .label_with_thumbs { float: left; width: 100%; min-height: 70px; margin: 0px 10px 2px 0px; adding: 0; } ul.label_with_thumbs li { padding:8px 0; min-height:65px; margin-bottom:10px; } .label_with_thumbs a {} .label_with_thumbs strong {} 2. save template. 3. add a widget. 3. edit widget. at this example i use random post with label "blogger", you must replace it with your label. <div s...
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.