lundi 28 juin 2021

Trouble in Getting Phone Number While Parsing the data inside the script

Code

import requests
from bs4 import BeautifulSoup as bs
my_url='https://www.olx.com.pk/item/oppo-f17-pro8128-iid-1034320813'


with requests.session() as s:
    r=s.get(my_url)
    page_html=bs(r.content,'html.parser')
    safe=page_html.findAll('script')
    print("The Length if Script is {0}:".format(len(safe)))
    for i in safe:
        if "+92" in str(i):
             print(i)

Query

Image 1

Image 2

I Want To Get that phone number that is actually present in windows.state using python script but I donot know how to parse the window.state.Will be very Thankful If you assist me that problem. Thanks in Advance!




Aucun commentaire:

Enregistrer un commentaire