Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import requests
- import time
- from bs4 import BeautifulSoup
- from selenium import webdriver
- start = time.time()
- lfc_url = "https://twitter.com/lfc"
- lfc_r = requests.get(lfc_url)
- lfc_c = lfc_r.content
- lfc_soup = BeautifulSoup(lfc_c,'html.parser')
- lfc_fol = lfc_soup.find_all("span", class_="ProfileNav-value")
- url = "http://web.archive.org/web/20160101000000*/https://twitter.com/lfc"
- browser = webdriver.Chrome()
- browser.implicitly_wait(60)
- browser.get(url)
- html = browser.page_source
- soup = BeautifulSoup(html,'lxml')
- bubble = soup.find_all("div",class_="captures")
- for link in soup.find_all('a'):
- print(link.get('href'))
- end = time.time()
- print(str(end - start) + ' seconds to run')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement