mwscrape error unrecoginized argument --user-agent

16 views
Skip to first unread message

AardF...@web.de

unread,
May 12, 2023, 5:48:51 AMMay 12
to aarddict
trying to scrape de.wikihow.com with
mwscrape -c http://admin:secret@localhost:5984 https://de.wikihow.com --db dewikihow --site-path=/ --user-agent "curl/8.87.0" --speed 0 --delay 3
I get the error message
mwscrape: error: unrecognized arguments: --user-agent curl/8.87.0

To fix the error I reinstalled mwscrape with

$ pip install https://github.com/itkach/mwscrape/tarball/master
Collecting https://github.com/itkach/mwscrape/tarball/master
  Downloading https://github.com/itkach/mwscrape/tarball/master
     | 20 kB 1.3 MB/s
Collecting CouchDB>=0.10
  Using cached CouchDB-1.2-py2.py3-none-any.whl (67 kB)
Collecting futures
  Using cached futures-3.0.5.tar.gz (25 kB)
Collecting mwclient>=0.10.0
  Using cached mwclient-0.10.1-py2.py3-none-any.whl (27 kB)
Collecting pylru
  Downloading pylru-1.2.1-py3-none-any.whl (16 kB)
Collecting requests-oauthlib
  Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from mwclient>=0.10.0->mwscrape==1.0) (1.16.0)
Requirement already satisfied: requests>=2.0.0 in /usr/lib/python3/dist-packages (from requests-oauthlib->mwclient>=0.10.0->mwscrape==1.0) (2.25.1)
Collecting oauthlib>=3.0.0
  Downloading oauthlib-3.2.2-py3-none-any.whl (151 kB)
     |████████████████████████████████| 151 kB 3.2 MB/s
Building wheels for collected packages: mwscrape, futures
  Building wheel for mwscrape (setup.py) ... done
  Created wheel for mwscrape: filename=mwscrape-1.0-py3-none-any.whl size=13922 sha256=2b82bc6a484a132a5164c66d88a825663323b727727a9d6af857f47759414780
  Stored in directory: /tmp/pip-ephem-wheel-cache-_c6gsjwq/wheels/a4/76/a7/a95d5b7c822069ba8278bf6b22f3f1dbc2a464d5a0feaad0b0
  Building wheel for futures (setup.py) ... done
  Created wheel for futures: filename=futures-3.0.5-py3-none-any.whl size=14078 sha256=b8c3467918ee7409aa77a7268d76fc8f1ce47c514af12bdd70eff7f393113741
  Stored in directory: /home/markus/.cache/pip/wheels/8a/4a/78/55bd408a487ca924f2053502beebf28862be93f14a1ba0a45c
Successfully built mwscrape futures
Installing collected packages: oauthlib, requests-oauthlib, pylru, mwclient, futures, CouchDB, mwscrape
  WARNING: The scripts couchdb-dump, couchdb-load, couchdb-load-design-doc, couchdb-replicate and couchpy are installed in '/home/user/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  NOTE: The current PATH contains path(s) starting with `~`, which may not be expanded by all applications.
  WARNING: The scripts mwresolvec and mwscrape are installed in '/home/user/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  NOTE: The current PATH contains path(s) starting with `~`, which may not be expanded by all applications.
Successfully installed CouchDB-1.2 futures-3.0.5 mwclient-0.10.1 mwscrape-1.0 oauthlib-3.2.2 pylru-1.2.1 requests-oauthlib-1.3.1

adding the path to mwscrape to $PATH did not help

Any ideas?

sklart

unread,
May 12, 2023, 3:23:45 PMMay 12
to aarddict

пятница, 12 мая 2023 г. в 12:48:51 UTC+3, AardF...@web.de:
It seems I had a similar error.
 I decided by completely reinstalling the program (with the initial deletion of the folder in the home directory)
 
Reply all
Reply to author
Forward
0 new messages