I’m trying to scrape clap data from medium let’s say this is the link. When I inspect it looks like in this photo.
My code looks like this :
URL = "https://medium.com/@xdxxxx4713/basic-settings-of-nginx-aeace532534f"
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
print(soup.prettify())
There’s only — in the output where there should be the value of the clap. If it’s possible how can I scrape the clap value without using Selenium? After getting the value with HTML request "requests.get(URL)" I can do the rest. The html request returns empty at where the clap value should be.
- I tried to use urllib library but I have Non-ASCII characters on my links
- I tried using BeautifulSoup’s findChildren library.
- I tried using BeautifulSoup’s descendants traverse algorithm.
2
Answers
As @esqew mentioned on commands. There's an API for that but It didn't work for me. But I was inspired by the API code. Here's my code :
It’s possible, try the code below:
This will return: