Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import re
- import urllib2
- from urllib2 import Request, urlopen, HTTPError, URLError
- from bs4 import BeautifulSoup
- import requests
- def check_username(username):
- site = "https://www.gotinder.com/@%s" % (username)
- request = urllib2.Request(site) #build request
- request.add_header('User-Agent', "poop 3.0") #use random user agent
- page = urllib2.urlopen(request) #connect to website and get html data into variable
- soup = BeautifulSoup(page, 'html.parser') #parse data into soup
- #image = soup.findAll('img')[1].get('src')
- #print(image)
- print('Looking up Tindr user: %s')%(username)
- if soup.body.findAll(text='Looking for Someone?'): #check if CAPTCHA was triggered
- print("[X] "+"Profile Not Found!")
- return
- photo = soup.find("img", id="user-photo")
- print('Picture: %s')%(photo['src'])
- name = soup.find("span", id="name")
- print ('Name: %s')%(name.text)
- teaser = soup.find("span", id="teaser")
- print ('Info: %s')%(teaser.text)
- age = soup.find("span", id="age")
- age = (age.text).replace(',','')
- print ('Age:%s')%(age)
- check_username('illwill')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement