Wednesday, December 11, 2013

Changes 12/11/13

Heading:

  • http://appft.uspto.gov/netahtml/PTO/search-adv.html has all the codes for searching specific fields of the applications 
  • Created a basic python program to generate a search url and get the html.
  • import urllib.request
    
    search = input("Insert your search terms: ")
    tag = input("Insert your tag: ")
    urlstring = "http://appft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.html&r=0&p={{page}}&f=S&l=50&Query={{tag}}%2F%22{{query}}%22&d=PG01" 
    # Replace placeholder strings with actual input 
    urlstring = urlstring.replace('{{page}}', str(1)) 
    urlstring = urlstring.replace('{{tag}}', tag)
    urlstring = urlstring.replace('{{query}}', search.strip().replace(' ', '+'))
    print(urlstring)
     
    # Get raw html from the query url 
    response = urllib.request.urlopen(urlstring)
    html = response.read()
    print(html)
  • So entering "National Science Foundation" for search and "GOVT" for tag generates a query identical to the example in the email

No comments:

Post a Comment