Mr_hEx icon

Untitled

Mr_hEx | PRO | 07/04/20 05:30:11 PM UTC | 0 ⭐ | 394 👁️ | Never ⏰ | []
Python |

1.53 KB

|

None

|

0 👍

/

0 👎

import requests
from bs4 import BeautifulSoup
 
def New_URL(x):
    soup = BeautifulSoup(x.text, 'html.parser')
    url_with_Tag = str(soup.find_all("div", class_="load-more-wrapper"))
    url_half_Tag = url_with_Tag[43:]
    index_of_End = url_half_Tag.find(">")
    count_char = 0
    URL_char = []
    for i in url_half_Tag:
        count_char +=1
        if count_char < index_of_End:
           URL_char.append(i)
    URL_final = ''.join(URL_char)
    #print("[+] URL : {}".format(URL_final.replace("amp;","")))
    URL_final2 = URL_final.replace("amp;","")
    return URL_final2;
 
 
 
def Get_user(x):
         try:
            soup = BeautifulSoup(x.text, 'html.parser')
            for XX in range(500):
                user_with_Tag = str(soup.find_all("span", class_="followers_username")[XX])
                user_half_Tag = user_with_Tag[33:]
                index_of_End = user_half_Tag.find("<")
                count_char = 0
                user_char = []
                for i in user_half_Tag:
                    count_char +=1
                    if count_char < index_of_End:
                       user_char.append(i)
                user_final = ''.join(user_char)
                print("[+] user : {}".format(user_final))
         except:
                print("[+] Loading more users Please wait !!")
 
for ZZ in range(10):
    Url = 'https://www.picuki.com'
    url_tmp = '/followers/cristiano'
    url_Final = Url+url_tmp
    x = requests.get(url_Final)
    Get_user(x)
    url_tmp = New_URL(x)

Comments