Hawkeye Digital
Rules Violation
- Feb 23, 2022
- 6,316
- 1,708
Do you do chrome bots ?
Can you write a code to scrape domains, check their DA and category?Got into python and I'm obsessed with it. But I'm not finding any real world problems to solve or automate. And having been around BHW for so many years there is only a set of problems that I'm actually interested in solving. I am deeply sorry for the hungry kids but NO I don't want to plot global hunger stats. I would like to code up stuff that makes getting rich easier.
So if you have anything that you'd like coded up in python, do post your requirement here.
Catch: the code would be opensourced and published on github, and probably on a thread under Making Money section too. So please do not ask me to make stuff that you'd like to keep proprietary.
So please challenge me. Please list out your requirements and I'll reply once I take it up. I can take only 1 project at a time.
I'd like to see what I'm worth to the IM community with my new found skill.
And please don't ask me to make a scraper. HTML traumatises me. If you need something pulled from an api I can definitely do that for you.
All discussions and requirements to be posted on this thread, there will be no private conversations. And if it is something that I would prefer not to work on, which I might if the work isn't challenging enough (or too challenging), please accept my apologies.
Are you doing machine learning and / or stuff related to that already? That's great. Many coders spend years to get to this point.Hey guys, been a little busy with an NLP thing with the working title WordAI Killer. I'll launch it soon and revisit this thread right after that. Please keep posting requests until then
import json
import sys
import requests
def search(title):
url = "http://archive.org/advancedsearch.php"
params = {"q": f"title:({title})",
"output": "json",
"fields": "identifier,title",
"rows": 50,
"page": 1,}
resp = requests.get(url, params=params)
return resp.json()
if __name__ == "__main__":
title = sys.argv[1]
data = search(title)
docs = data["response"]["docs"]
print(f"Found {len(docs)} items, showing first 10")
print("identifier\ttitle")
for row in docs[:10]:
print(row["identifier"], row["title"], sep="\t")
"""Find a video at the Internet Archive
by a partial title match and display it."""
import sys
import webbrowser
import requests
def search(title):
"""Return a list of 3-item tuples (identifier,
title, description) about videos
whose titles partially match :title."""
search_url = "https://archive.org/advancedsearch.php"
params = {
"q": "title:({}) AND mediatype:(movies)".format(title),
"fl": "identifier,title,description",
"output": "json",
"rows": 10,
"page": 1,
}
resp = requests.get(search_url, params=params)
data = resp.json()
docs = [(doc["identifier"], doc["title"], doc["description"])
for doc in data["response"]["docs"]]
return docs
def choose(docs):
"""Print line number, title and truncated description for
each tuple in :docs. Get the user to pick a line
number. If it's valid, return the first item in the
chosen tuple (the "identifier"). Otherwise, return None."""
last = len(docs) - 1
for num, doc in enumerate(docs):
print(f"{num}: ({doc[1]}) {doc[2][:30]}...")
index = input(f"Which would you like to see (0 to {last})? ")
try:
return docs[int(index)][0]
except:
return None
def display(identifier):
"""Display the Archive video with :identifier in the browser"""
details_url = "https://archive.org/details/{}".format(identifier)
print("Loading", details_url)
webbrowser.open(details_url)
def main(title):
"""Find any movies that match :title.
Get the user's choice and display it in the browser."""
identifiers = search(title)
if identifiers:
identifier = choose(identifiers)
if identifier:
display(identifier)
else:
print("Nothing selected")
else:
print("Nothing found for", title)
if __name__ == "__main__":
main(sys.argv[1])
import json import sys import requests def search(title): url = "http://archive.org/advancedsearch.php" params = {"q": f"title:({title})", "output": "json", "fields": "identifier,title", "rows": 50, "page": 1,} resp = requests.get(url, params=params) return resp.json() if __name__ == "__main__": title = sys.argv[1] data = search(title) docs = data["response"]["docs"] print(f"Found {len(docs)} items, showing first 10") print("identifier\ttitle") for row in docs[:10]: print(row["identifier"], row["title"], sep="\t")
and
"""Find a video at the Internet Archive by a partial title match and display it.""" import sys import webbrowser import requests def search(title): """Return a list of 3-item tuples (identifier, title, description) about videos whose titles partially match :title.""" search_url = "https://archive.org/advancedsearch.php" params = { "q": "title:({}) AND mediatype:(movies)".format(title), "fl": "identifier,title,description", "output": "json", "rows": 10, "page": 1, } resp = requests.get(search_url, params=params) data = resp.json() docs = [(doc["identifier"], doc["title"], doc["description"]) for doc in data["response"]["docs"]] return docs def choose(docs): """Print line number, title and truncated description for each tuple in :docs. Get the user to pick a line number. If it's valid, return the first item in the chosen tuple (the "identifier"). Otherwise, return None.""" last = len(docs) - 1 for num, doc in enumerate(docs): print(f"{num}: ({doc[1]}) {doc[2][:30]}...") index = input(f"Which would you like to see (0 to {last})? ") try: return docs[int(index)][0] except: return None def display(identifier): """Display the Archive video with :identifier in the browser""" details_url = "https://archive.org/details/{}".format(identifier) print("Loading", details_url) webbrowser.open(details_url) def main(title): """Find any movies that match :title. Get the user's choice and display it in the browser.""" identifiers = search(title) if identifiers: identifier = choose(identifiers) if identifier: display(identifier) else: print("Nothing selected") else: print("Nothing found for", title) if __name__ == "__main__": main(sys.argv[1])
I don't know what you were trying to achieve, so I cant tell if this might be a blueprint to the solution. The credit goes to Bill Lubanovic. Code is blatantly ripped from 'Introducing Python' by Bill Lubanovic
sounds interesting. please tell me more about itHi @Paranoid Android , is it possible to write an Audiomack autostream code??
More like a bot in which you input the link to a music on Audiomack... It auto plays the music for minimum of 10 to 15 seconds, reloads the page and continues againsounds interesting. please tell me more about it