Get patent info from GPSS then write date into Notion
- Set token_v2 in notionPatent.py
- Set the notion url that you want to edit in notionPatent.py line 22, like this url
$ python GPSSToNotion.py -n US20200120829A1
or
$ python GPSSToNotion.py -f list_of_patent_numbers.excel- notion: requests.exceptions.HTTPError: Invalid input.
- chromedriver can not use --headless, the GPSS website will block you
- url for develop this tool
- notion package collection structure
File Structure
|-- Get Started
|-- hidden layer (collection view)
|-- test (collection)
|-- Page 1 (collection row block)
|-- collection container (collection view block)
|-- table (collection)
|-- Page 2 (collection row block)
|-- Page 3 (collection row block)
"""
cv = client.get_collection_view(hidden_layer_url_or_id)
collection = cv.collection # It's test
# print out "Page1", "Page2", "Page3"
for row in collection.get_rows():
print(row.name)
"""
create Page 4 under test
"""
row_page_4 = collection.add_row()
row_page_4.title = "Page 4"
"""
create table under Page 1 (collection row block)
"""
page1 = collectin.get_rows()[0]
# create collection container(collection view block) to store collection (e.g. table)
cvb = page1.children.add_new(CollectionViewBlock)
# set collection property to collection container
cvb.collection = client.get_collection(
client.create_record("collection", parent=cvb)
)
cvb.title = "Set collection container title"
# create table under collection container
cvb.views.add_new(view_type="table")
# add row to collection
row = cvb.collection.add_raw()