I have been having a headache for a week because of Python dynamic page crawling.Masters, please help me crying

Asked 1 years ago, Updated 1 years ago, 68 views

While crawling data through Python, I want to ask you something about dynamic page crawling. Most of the other sites have been crawled through requests, beautiful soup, and selenium http://www.searchain.io/btcmonitor It is difficult to crawl the dynamic page of the above site because the url does not change. The data I'd like to crawl is http://www.searchain.io/btcmonitor%EC%97%90%EC%84%9C> where you click on the large amount transout (24h) tab -> 100-500 I'd like to get the data.

When I looked up the data, it was being sent to xhr, and when I looked at the address of xhr, http://scvelk.searchain.io/open/address/btc_trans_record?type=eth_single_record_count&size=15&page=1&numeric_type=1 It was connected to . I tried sending it through request, get request, but I am getting an error message such as {"errno":400",errmsg":"signerr",timestamp":1542042533",data":[]} instead of the json response I want. Can't I connect this page with a request? Or I would like to ask if it is an error caused by not entering parameters properly.

Faced with constant difficulties, I tried to parse using selenium.

I tried to get the information after clicking radio using selenium.When using click() Element is not clickable at point (314,227) because another element obscures it The error message appears. I don't think I can click because another class is on top.What should I do? Please give me some advice.

import requests URL = 'http://scvelk.searchain.io/open/address/btc_trans_record?type=eth_single_record_count&size=15&page=1&numeric_type=1' res = requests.get(URL) print(res.text)

Response----------------------- {"errno":400,"errmsg":"sign err","timestamp":1542178220,"data":[]}

from selenium import webdriver from selenium.webdriver.firefox.options import Options from selenium.webdriver.support.ui import WebDriverWait

options = Options() options.add_argument("--headless") driver = webdriver.Firefox(firefox_options=options)

driver.get('http://www.searchain.io/btcmonitor')

WebDriverWait(driver, 3) c2 = driver.find_element_by_xpath("//*[@id='btccardbody']/div[1]/div[2]/div[2]/div[1]/div/div/div[1]/div/label[4]") c2.click()

html = driver.page_source print(html)

driver.close() driver.quit()

Response----------------------- selenium.common.exceptions.ElementClickInterceptedException: Message: Element is not clickable at point (314,227) because another element obscures it

python selenium xhr dynamic-page requests

2022-09-22 10:56

1 Answers


2022-09-22 10:56

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.