Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- HOST = 'https://rifme.net/'
- URL = 'https://rifme.net/r/%D0%BC%D0%B8%D1%80/0'
- HEADERS = {
- 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
- 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0'
- }
- def get_html(url, params=''):
- r = requests.get(url, headers=HEADERS, params=params)
- return r
- get_html(URL)
- #
- # html = get_html(URL)
- #
- # response = requests.get(URL)
- # soup = BeautifulSoup(get_html(URL), 'lxml')
- #
- # print(soup)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement