Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from requests_html import HTMLSession
- file = open("photos3.txt", "a")
- session = HTMLSession()
- url = 'https://fedoseevafoto.ru/disk/19-01-2023-4d-shkola-2030-1/xwykflar'
- response = session.get(url, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ('
- 'KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'})
- response.html.render(sleep=1)
- #536
- for i in range(1,300):
- st = 'body > div.wrapper > div.project-wrapper > div.grid.pieces.pieces--masonry.grid--medium-pad > ' \
- 'div:nth-child({}) > div > a '.format(i)
- titles = response.html.find(st)
- file.write(str(titles[0]).split("'")[-2]+"\n")
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement