Hi I am getting the error get() missing 1 required positional argument: 'url' I am using HTMLsession for importing the data from a website. sharing the code below. '''
from requests_html import HTMLSession
from bs4 import BeautifulSoup
import requests
session=HTMLSession
url="https://pureportal.coventry.ac.uk/en/organisations/coventry-university/publications/"
def data(url):
r=session.get(url)
r.html.render(sleep=1)
soup=BeautifulSoup(r.html.html,"html.parser")
return soup
def Allpage(soup):
page=soup.find("li",{"class":"step"})
if not page.find("li",{"class":"next"}):
url="https://pureportal.coventry.ac.uk/" + str(page.find("li",{"class":"step"})).find("a")["href"]
return url
else:
return
while True:
getdata=data(url)
url=Allpage(getdata)
print(URL)
'''
TypeError: get() missing 1 required positional argument: 'url'