Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23276

The Python dictionary of my code doesn't work as my purpose

$
0
0

I made the dictionary data set of named self.past_data for clearing and finding histories that. come from find_elements functions.

First of all, you can see the code named linkbot below.

linkbot.

And then,you can see the code named main_test below.

main_test.

Suppose I execute
find_elements_by_tag('div', filter=False)find_elements_by_tag('a')self.current_elements should save the HTML div a filtered elements

I expect the tag section: ['div, 'a'], the function section: . ['find_elements_by_tag','find_elements_by_tag'], the value section: ['div', 'a'].total three section of self.current_data and self.past_data.

I also expect tag:['a'], function:['find_elements_by_tag', 'filter_hrefs'], value= ['a','list']of current_data and past_data.in actual main_test code.
But it can't do.
Q: How to resolve that?

Description: In my entire code, current means the current page your object parsing.


Viewing all articles
Browse latest Browse all 23276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>