HNHacker News
TopNewBestAskShowJobs

pygix

15 karma · joined March 26, 2017

submissionscomments
pygix··on Ask HN: Whom to follow for the best advice?
Thanks. I follow most of them.
pygix··on Ask HN: What's the most expensive mistake you've ever made
The most expensive mistake I've made is not focusing on a single goal, task, technology, or stack. I keep changing my goals. Because of that I have learnt nothing today. Any idea to get rid off this habit?
pygix··on Ask HN: Building a side project that makes money. Where to start?
Can the below code be sold to raise money?

import requests from bs4 import BeautifulSoup

url = "http://www.python.org" response = requests.get(url)

page = str(BeautifulSoup(response.content))

def getURL(page): """

    :param page: html of web page (here: Python home page) 
    :return: urls in that page 
    """
    start_link = page.find("a href")
    if start_link == -1:
        return None, 0
    start_quote = page.find('"', start_link)
    end_quote = page.find('"', start_quote + 1)
    url = page[start_quote + 1: end_quote]
    return url, end_quote
while True: url, n = getURL(page) page = page[n:] if url: print(url) else: break
pygix··on Ask HN: Is there room for another search engine?
Build a local search engine for a very focused niche.