UltimaHoarder / UltimaScraper

Scrape all the media from an OnlyFans account - Updated regularly
GNU General Public License v3.0
3.88k stars 609 forks source link

AttributeError - Windows 10 #208

Closed ghost closed 4 years ago

UltimaHoarder commented 4 years ago

Edited comment.

UltimaHoarder commented 4 years ago

??? The instructions are clear and thousands of people have downloaded this and never have I heard of manually creating folders. This isn't because of me.

Why the frustration. I followed your instructions in the guide you wrote. I think you need to be more clear on what you did to get it to run because I keep having issues trying to get the damn thing to work.

pip install -r requirements.txt works fine but brings up an error

Failed to build lxml
Installing collected packages: lxml
  Running setup.py install for lxml
    Complete output from command c:\users\xD3CrypTionz\appdata\local\programs\python\python38-32\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\xD3CrypTionz\\AppData\\Local\\Temp\\pip-build-13gvkriv\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\xD3CrypTionz\AppData\Local\Temp\pip-2km3hzt6-record\install-record.txt --single-version-externally-managed --compile:
    Building lxml version 4.5.0.
    Building without Cython.
    ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
    ** make sure the development packages of libxml2 and libxslt are installed **

    Using build configuration of libxslt
    running install
    running build
    running build_py
    running build_ext
    building 'lxml.etree' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

    ----------------------------------------
Command "c:\users\xD3CrypTionz\appdata\local\programs\python\python38-32\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\xD3CrypTionz\\AppData\\Local\\Temp\\pip-build-13gvkriv\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\xD3CrypTionz\AppData\Local\Temp\pip-2km3hzt6-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\xD3CrypTionz\AppData\Local\Temp\pip-build-13gvkriv\lxml

I had to manually create the folders in modules folder and put the .py files into their respective folders

Then I opened up the cmd from the script folder and wrote python StartDatascraper.py which brings up the error message i initially posted before.

The fix for this is literally where it says "error".

UltimaHoarder commented 4 years ago

??? The instructions are clear and thousands of people have downloaded this and never have I heard of manually creating folders. This isn't because of me.

The fix for this is literally where it says "error".

I'll try download the Microsoft Visual C++ 14.0 tool set and report back. Might be worth mentioning it as part of the build as I didn't know you had to have this installed for some things to work.

It already shows an error message and tells you what to do to fix it? What more do you want from that? If I was to handhold and include error messages like that in the script, you'd be downloading a 1GB+ Readme.

UltimaHoarder commented 4 years ago

Okay so I installed the Microsoft Visual C++ Studio and its toolset.

Now I'm getting this error when running the StartDatascraper.py command

2020-04-16 20:28:04,290 ERROR errors Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
Traceback (most recent call last):
  File "StartDatascraper.py", line 170, in <module>
    result = x.start_datascraper(
  File "E:\OnlyFans\modules\onlyfans.py", line 87, in start_datascraper
    results = media_scraper(
  File "E:\OnlyFans\modules\onlyfans.py", line 428, in media_scraper
    x = pool.starmap(scrape_array, product(
  File "C:\Users\xD3CrypTionz\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 372, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "C:\Users\xD3CrypTionz\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 768, in get
    raise self._value
  File "C:\Users\xD3CrypTionz\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "C:\Users\xD3CrypTionz\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 51, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "E:\OnlyFans\modules\onlyfans.py", line 310, in scrape_array
    file_path = reformat(directory[0][1], media_id, file_name,
  File "E:\OnlyFans\modules\helpers.py", line 42, in reformat
    text = BeautifulSoup(text, 'lxml').get_text().replace(
  File "C:\Users\xD3CrypTionz\AppData\Local\Programs\Python\Python38-32\lib\site-packages\bs4\__init__.py", line 225, in __init__
    raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

Funny thing is I installed lxml from: https://pypi.org/project/lxml/3.4.1/

Wrong LXML. image

UltimaHoarder commented 4 years ago

Search on google for your errors with the package