MatthewSmith430 / CompaniesHouse

This package allows to extract data from the Companies House API and create interlocking directorates networks
29 stars 4 forks source link

CompanySearch returns a too long a list #1

Closed lawrencebywater closed 5 years ago

lawrencebywater commented 5 years ago

Ideally need an argument whereby only the first result is returned, I am finding for almost all company names the list returned is so long that the function eventually falls over and returns the following error: " Error: parse error: premature EOF

                 (right here) ------^ "
MatthewSmith430 commented 5 years ago

I have added two new functions:

CompanySearch_limit This return the first page of results – so the first 20 results

CompanySearch_limit_first This return the first search result only

Therefore – these can be used when you have a specific search term, but for more general search terms – like “bitcoin” the CompanySearch function can be used.

Kind regards,

Matthew

lawrencebywater commented 5 years ago

Thanks, that’s awesome. On a sort of related note, i am having issues when searching for companies that have an ‘&’ in the name.

E.g. ‘D & G investments limited’ will return a company just called ‘D’.

Many thanks Lawrence

lawrencebywater@gmail.commailto:lawrencebywater@gmail.com | (+44) 07743780996

On 15 Dec 2018, at 16:48, Matthew Smith notifications@github.com<mailto:notifications@github.com> wrote:

I have added two new functions:

CompanySearch_limit This return the first page of results – so the first 20 results

CompanySearch_limit_first This return the first search result only

Therefore – these can be used when you have a specific search term, but for more general search terms – like “bitcoin” the CompanySearch function can be used.

Kind regards,

Matthew

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MatthewSmith430/CompaniesHouse/issues/1#issuecomment-447581686, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AruQ198TQJL8ukWEKc1lmbGwv2JZosqrks5u5SfugaJpZM4ZRbn7.

MatthewSmith430 commented 5 years ago

Thanks for pointing that out. I have corrected that - it should now work.

Kind regards,

Matthew