miko1ann

Results 6 comments of miko1ann

I got this issue. And my workaround is patch two methods: **patch_crudrouter** ``` def get_pk_type_patch(schema: Type[PYDANTIC_SCHEMA], pk_field: str) -> Any: try: return schema.__fields__[pk_field].annotation except KeyError: return int from pydantic import...

I tryed to replace user-agent but error stil repduces. So problen is in securuty policy of finam api.

Workaround with selenium ` def fetcher (url, lines=False): print ('>>>', url) driver.get(url) res = WebDriverWait(driver, 100).until( lambda driver: driver.find_element(By.XPATH, "//*").get_attribute('outerHTML')) if lines: res = res.split('\n') return res ... exporter =...

> No nesessary, just copy and use. Also this way contains issue with encoding for cyrilyc symbols. update def fetcher (url, lines=False): print ('>>>', url) driver.get(url) res = WebDriverWait(driver, 100).until(...

Complete workaround, contains downloading data. def fetcher (url, lines=False): print ('>>>', url) driver.get(url) res = WebDriverWait(driver, 15).until( lambda driver: driver.find_element(By.XPATH, "//*").get_attribute('outerHTML')) if lines: res = res.encode('cp1252').decode('cp1251') res = res.split('\n') return...

Thanks @ffeast fo the extensible and clear code.