Comments (5)
Hey, thanks for the fast response! I just made a new environment and tried to set up everything. However, (even if the package gets downloaded into the "package"-folder) I get following error:
Traceback (most recent call last):
File "{path}/function.py", line 1, in <module>
from package import trafilatura
File "{path}\package\trafilatura\__init__.py", line 16, in <module>
from .core import extract, process_record
File "{path}\package\trafilatura\core.py", line 16, in <module>
from lxml import etree, html
ModuleNotFoundError: No module named 'lxml'
from trafilatura.
Afaik, lxml needs to be compiled and installed for each machine. Therefore, „portable“ compatibility (install it to a folder and copy it anywhere and run it) can’t be achieved with lxml. In my case I would like to push it on AWS Lambda (localstack; can't install things easily there). I guess it won’t work as long as this project builds on lxml. However, I already found some alternatives for now (I expose your project via a REST-Service on my machine for development purposes). Later (on AWS) I should be able to use EC2 to install all necessary packages such as lxml.
from trafilatura.
Thank you, it was indeed a problem, I fixed it in 1a57635, could you please confirm by trying the version straight from the repository? (pip install -U git+https://github.com/adbar/trafilatura.git
with your --target
)
from trafilatura.
from trafilatura.
Hi @HaIDsIEx, please refer to this answer and this code snippet, both show how to solve the issue with LXML.
from trafilatura.
Related Issues (20)
- include_links breaks the extraction for https://news.ycombinator.com HOT 2
- Consider switching from lxml's clean_html for enhanced security (and possibly performance) HOT 1
- Error when multiproessing HOT 1
- Multiple spaces within a text element are not supported HOT 5
- Inconsistent behavior on macOS HOT 3
- Unable to extract text from a given site, TypeError: unhashable type: 'set' HOT 5
- crawl only sub-pages from an arbitrary URL? HOT 3
- Parts are getting missed out after using extract funtion HOT 1
- List items are being missed HOT 6
- Entire/majority content of these 2 sites being missed out HOT 4
- trafilatura fails extracting HOT 7
- colors and error in running gui HOT 2
- xml namespace support in sitemaps HOT 1
- XML Parsing breaks on valid HTML HOT 4
- Text extraction performance fix. HOT 1
- Python 3.12 support for MacOS HOT 2
- Cannot fetch url with more than 2 redirections HOT 1
- i could not extract tables from trafilatura library HOT 1
- Few issues with tests. HOT 1
- Here is an interesting example... any tips? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trafilatura.