Looking for advice on steam related python program -
i working on making program in python takes list of dictionary words user enters (split comma's or on separate lines) , adds each 1 end of url (http://steamcommunity.com/id/) checks each 1 of urls , prints ones "the specified profile not found." text on web page (example http://prntscr.com/gjdzuf), understand not difficult, have started learning python, , looking easiest method trying achieve, useful feedback appreciated snippets, advice, etc. :)
you're looking requests
module. simple checking whether text in page, do:
import requests r = requests.get('http://steamcommunity.com/id/') if 'the specified profile not found.' in r.text: print('invalid profile!') else: print('found profile.')
for more complex processing, parsing library such beautifulsoup4
needed.
this practice referred "web scraping", , python has great tools it.
Comments
Post a Comment