Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import requests
- from bs4 import BeautifulSoup
- list = [
- 'http://engagetheirminds.com/genius-hour-resources/',
- 'https://www.google.com/trends/',
- ]
- for a in list:
- links = ['https://www.diigo.com/people/search/url?page=' + str(i+0) + '&query='+a for i in range(1)]
- for link in links:
- print link
- res = requests.get(link)
- bs_tree = BeautifulSoup(res.text.encode("utf-8"), "html.parser")
- users = bs_tree.select('div.userListUser')
- for user in users:
- s = str(user)
- bs_subtree = BeautifulSoup(s, "html.parser")
- user = [u.text for u in bs_subtree.select('h3.userListName a.link2')]
- print user[0]
- tags = [a.text for a in bs_subtree.select('div.userListDesc div.userListTags a')]
- print tags
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement