только начал изучать Питон. делаю парсер. не пойму в чем причина ошибки
пипы:
beautifulsoup4 4.9.3
requests 2.24.0
C:\Users\user3\AppData\Local\Programs\Python\Python39\python.exe C:/bottest/bot.py
File "C:\bottest\bot.py", line 21
'link': item.find('a', class_='c-events__name').get.('href')
^
SyntaxError: invalid syntax
Process finished with exit code 1
без строки 'link': item.find('a', class_='c-events__name').get.('href') все ок, но мне нужно найти ссылки на матчи
	
	
	
		
			
			пипы:
beautifulsoup4 4.9.3
requests 2.24.0
C:\Users\user3\AppData\Local\Programs\Python\Python39\python.exe C:/bottest/bot.py
File "C:\bottest\bot.py", line 21
'link': item.find('a', class_='c-events__name').get.('href')
^
SyntaxError: invalid syntax
Process finished with exit code 1
без строки 'link': item.find('a', class_='c-events__name').get.('href') все ок, но мне нужно найти ссылки на матчи
		Python:
	
	import requests
from bs4 import BeautifulSoup
URL = 'https://ua-1x-bet.com/ua/line/Basketball/'
HEADERS = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0' , 'accept': '*/*'}
def get_html(url, params=None):
    r = requests.get(url, headers=HEADERS, params=params)
    return r
def get_content(html) :
    soup = BeautifulSoup(html, 'html.parser')
    items = soup.find_all('a', class_='c-events__name')
    events = []
    for item in items:
        events.append({
            'title': item.find('span', class_='c-events__teams').get_text()
            'link': item.find('a', class_='c-events__name').get.('href')
        })
        print(events)
def parse():
    html = get_html(URL)
    if html.status_code == 200:
        get_content(html.text)
    else:
        print('Error')
parse()
			
				Последнее редактирование: 
				
		
	
										
										
											
	
										
									
								 
				
		