Installing the Builtwith module in the PYTHON3 environment

Source: Internet
Author: User

1. Installation command:

Pip Install Builtwith

If you are prompted with the following error on the command line:

Fatal error in launcher:unable to create process using ' "'

Use the following command:

python3-m pip Install Builtwith

2. An error message will appear in the Import module:

Cause: The Builtwith module is based on URLLIB2 development, but in Python3 Urllib2 split into Urllib.request and urllib.error two packets, resulting in the package is not found;

Workaround:

--Find the __init__.py file in the Builtwith installation directory

    

--Replace import urllib2 with import Urllib.request

    

--The __init__.py file, the other places to write Urllib2, are changed to Urllib.request (in the text editor can be replaced with all)

3, call the function in the Builtwith module, error, for example: Builtwith.parse (' http://www. xxx. com ')

Cause: In the __init__.py file of the Builtwith module:

First, follow the rules of Python2 to write the exception capture: Except Exception, E, does not conform to the rules of Python3;

Second, follow the Python2 rules write output statement: print xxx;

Thirdly, the data format returned by Urllib has changed and needs to be transcoded.

Workaround:

--Find the __init__.py file in the Builtwith installation directory

First, the exception capture statement: Except Exception, E: Changed to: Except Exception as E: (Can find the function to modify, a total of few places)

Second, the print xxx to print (XXX) (can find the function to modify, a total of a few places)

Third, in the HTML = Response.read () Add a sentence: HTML = html.decode (' Utf-8 ') (can find the function to modify, just one place)

Installing the Builtwith module in the PYTHON3 environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.