Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list1 = (a,b,c,d)
- list2 = (1,2,3,4)
- resultList = (a1,b2,c3,d4)
- #--------------------------------------------------------------------------------
- import MySQLdb
- from bs4 import BeautifulSoup
- import requests
- #link ---------------------------------------------------------------------------
- r1 = requests.get("http://www.metalinjection.net/")
- data1 = r1.text
- soup1 = BeautifulSoup(data1, "lxml")
- news1 = soup1.find_all("article", {"class": "post"})
- links1 = []
- for link in news1:
- links1.append(link.a['href'])
- # <a href = "link1">some text</a>
- description1 = []
- for desc in news1:
- description1.append(desc.contents[3].find_all("p")[1].text)
- zip1 = zip(reversed(description1) , reversed(links1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement