PyCharm IDE on Windows

0

I have the custom of using PyCharm over GNU / Linux, and by force majeure I will have to use it on Windows.

The problem is this: When running the python program through the IDE, a python crawler, the program does not end. It's like you're walking in an infinite loop. And because of this the html is not written to disk.

Question:

Note: The executed code was generated in Linux. And it works perfectly.

Example Snippet:

import requests
import inspect
def truncus05d(url):
    page = requests.get(url)
    with open('{}.html'.format(inspect.stack()[0][3]), 'w') as file:
        file.write(page.text.strip())

Complete code at: link

    
asked by anonymous 28.02.2018 / 15:56

0 answers