If you are trying out parsing in python, I would recommend giving [Lark](https://github.com/lark-parser/lark) a try. I have used it for smallish projects are its really easy to use especially with the Earley parser.
639 karma · joined September 21, 2009
> why is sky blue
Top result: https://www.wolframalpha.com/input/?i=why%20is%20sky%20blue
> what is the capital of punjab
Top result: https://www.wolframalpha.com/input/?i=what%20is%20the%20capi...
> what is the population of seattla (with typo)
Top result: https://www.wolframalpha.com/input/?i=what%20is%20the%20popu...
For one keyword query I tried "rust lang" the results felt very repetitive.
Just wondering if its a layer on top of Wolfram Alpha or is it doing QnA inference on its own.
import requests
from bs4 import BeautifulSoup
with requests.Session() as session:
page = 1
while True:
resp = session.get(
f"https://news.ycombinator.com/upvoted?id=ashish01&p={page}",
cookies={"user": "get this from your browser"},
)
tree = BeautifulSoup(resp.text)
links = [x["href"] for x in tree.select(".subtext .age a")]
if len(links) == 0:
break
for i, link in enumerate(links):
print(page, i, link.split("=")[1])
page = page + 1[0] https://www.youtube.com/watch?v=rAl-9HwD858 really helped me understand it.
Simple google search didn't get much details. Can someone please add some details or links for this?