Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. from bs4 import BeautifulSoup
  2. from requests import Session, get, post
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. with Session() as s:
  11.     url = "https://www.filmweb.pl/j_login"
  12.     payload = {'j_username': 'coen00', 'j_password': ' '}
  13.     s.post(url, data=payload)
  14.     # An authorised request.
  15.     for i in range(1,20):
  16.         page = s.get("https://www.filmweb.pl/user/coen00/wantToSee?page="+str(i)+"")
  17.         # print(page.url)
  18.         soup = BeautifulSoup(page.content, 'html.parser')
  19.  
  20.         movies = soup.find_all("h3", class_="filmPreview__title")
  21.  
  22.         for x in movies:
  23.             print(x.getText())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement