Path: blob/master/Investigation/spamControl2.py
193 views
import requests1from bs4 import BeautifulSoup2def returnValue():3return com4def getSpam(phone_number):5global com6headers = {7'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36'8}9try:10print(phone_number)11phone_number=phone_number.split("+")[1]1213reqToServer=requests.get(f"https://www.unknownphone.com/phone/{phone_number}",headers=headers)14print("here2")15source = BeautifulSoup(reqToServer.content,"lxml")16com=source.select('#content > div > main > section.user-scam-detected > div > p > mark > strong:nth-child(2)')[0].text1718except:19com="No spam info found"20212223