Comments (10)
Correctly using slashes instead of backslashes, there's no longer an error.
from kleinanzeigen-bot.
Hmm, I cannot reproduce, seems to work fine for me.
[INFO] App version: 0.1.dev1+ga5347fc
[INFO] Loading config from [D:\kleinanzeigen-bot\data\config.yaml]...
[INFO] -> found 75 categories
[INFO] Searching for ad config files...
[INFO] -> found 4 ad config files
How does your config.yaml look like?
from kleinanzeigen-bot.
Just republished some more ads, worked fine.
from kleinanzeigen-bot.
I have the same problem running the binary and the docker instance:
INFO] Logging to [/mnt/data/kleinanzeigen-bot.log]...
[INFO] App version: 0.1.dev1+g7e6fbfe.d20220622
[INFO] Loading config from [/mnt/data/config.yaml]...
[INFO] -> found 75 categories
[INFO] Searching for ad config files...
[INFO] -> found 0 ad config files
[INFO] ############################################
[INFO] DONE: No new/outdated ads found.
[INFO] ############################################
ad_files:
- '**/ad_*.{json,yml,yaml}'
# default values for ads, can be overwritten in each ad configuration file
ad_defaults:
active: true
type: OFFER # one of: OFFER, WANTED
description:
prefix: ''
suffix: ''
price_type: NEGOTIABLE # one of: FIXED, NEGOTIABLE, GIVE_AWAY, NOT_APPLICABLE
shipping_type: SHIPPING # one of: PICKUP, SHIPPING, NOT_APPLICABLE
contact:
name: ''
street: ''
zipcode:
phone: '' # IMPORTANT: surround phone number with quotes to prevent removal of leading zeros
republication_interval: 7 # every X days ads should be re-published
# additional name to category ID mappings, see default list at
# https://github.com/Second-Hand-Friends/kleinanzeigen-bot/blob/main/kleinanzeigen_bot/resources/categories.yaml
# Notebooks: 161/278 # Elektronik > Notebooks
# Autoteile: 210/223/sonstige_autoteile # Auto, Rad & Boot > Autoteile & Reifen > Weitere Autoteile
categories: []
# browser configuration
browser:
# https://peter.sh/experiments/chromium-command-line-switches/
arguments:
# https://stackoverflow.com/a/50725918/5116073
- --disable-dev-shm-usage
- --no-sandbox
# --headless
# --start-maximized
binary_location: # path to custom browser executable, if not specified will be looked up on PATH
extensions: [] # a list of .crx extension files to be loaded
use_private_window: true
user_data_dir: '' # see https://github.com/chromium/chromium/blob/main/docs/user_data_dir.md
profile_name: ''
# login credentials
login:
username: *******
password: ******
from kleinanzeigen-bot.
@domlysi where are the ad files located in this example? directly in /mnt/data/ or in a subdirectory?
what is the pattern you used to name your ad files? E.g. ad_XYZ.yml
from kleinanzeigen-bot.
@sebthom: Error also present in version: 0.1.dev1+g7e6fbfe
Just exchanging the binary and running 0.1.dev1+g2a28cc4.d20220531 works fine.
There are only 4 commits between 0.1.dev1+g7e6fbfe and 0.1.dev1+ga5347fc, I could test if you sent me the executables.
from kleinanzeigen-bot.
The issue was probably introduced by f924ed8 where I changed the globbing library.
However since I cannot reproduce the issue I don't know what to fix.
What happens if you change:
ad_files:
- "**/ad_*.{json,yml,yaml}"
back to
ad_files:
- "**/ad_*.json"
- "**/ad_*.yaml"
- "**/ad_*.yml"
?
from kleinanzeigen-bot.
Could get app version: 0.1.dev1+g4e8cb9c to work, it seems to be the globbing lib indeed.
Before
- EXE in D:\xxx\yyy\Programme\ebay
- ads in D:\xxx\yyy\Programme\ebay\ads
- images in D:\xxx\yyy\Programme\ebay\ads\img
- config.yaml contained
ad_files:
- "ads/**/ad_*.yml"
- ad_xxx.yml contained
images:
- img\ad1_*.JPG
Now (working with 0.1.dev1+g4e8cb9c)
- EXE in D:\xxx\yyy\Programme\ebay
- ads in D:\xxx\yyy\Programme\ebay\ads
- images in D:\xxx\yyy\Programme\ebay\ads (<- all images directly in here, no longer in a subfolder)
- config.yaml contains
ad_files:
- "ads/ad_*.yml"
- ad_xxx.yml contains
images:
- ad1_*.JPG
Having both, the ads and img folder in D:\xxx\yyy\Programme\ebay did not work, no matter how I included the images in the ad.
I'd like it, if we could somehow keep ads and images in different folders. Helps me to better manage the files.
from kleinanzeigen-bot.
@jniggemann better don't use backslashes as directory separator in the pattern, just use slashes.
a) backslashes they need to be escaped in YAML files, like \
-> \\
if the string is surrounded by quotes ("
or '
)
b) the globbing library also expects backslashes to be escaped if they symbolize a directory separator
images:
- "img\\\\ad1_*.JPG" # <- double escape backslashes in quoted strings
- img\\ad1_*.JPG # <- single escape backslashes in unquoted strings
Also, just to be clear: your previously working file structure looked like this
D:\xxx\yyy\Programme\ebay
|- kleinanzeigen-bot.exe
|- config.yml # contains: ad_files: -"ads/**/ad_*.yml"
|- ads\
|- ad_1_XYZ.yml # contains: images: -"img/ad1_*.JPG"
|- ads\img\
|- ad1_some_name.JPG
and you run the exe in a command line window where you CDed into D:\xxx\yyy\Programme\ebay
, like this:
D:\xxx\yyy\Programme\ebay> kleinanzeigen-bot.exe --config config.yml
from kleinanzeigen-bot.
better don't use backslashes as directory separator in the pattern, just use slashes.
Now that you say it, I remember... Single backslashes were automatically replaced by double backslashes in the inquoted strings I use.
Also, just to be clear: your previously working file structure looked like this
D:\xxx\yyy\Programme\ebay |- kleinanzeigen-bot.exe |- config.yml # contains: ad_files: -"ads/**/ad_*.yml" |- ads\ |- ad_1_XYZ.yml # contains: images: -"img/ad1_*.JPG" |- ads\img\ |- ad1_some_name.JPGand you run the exe in a command line window where you CDed into
D:\xxx\yyy\Programme\ebay
, like this:D:\xxx\yyy\Programme\ebay> kleinanzeigen-bot.exe --config config.yml
Correct with the only exception being I run it as D:\xxx\yyy\Programme\ebay> kleinanzeigen-bot.exe publish
without specifying the config file which gets picked up automatically.
from kleinanzeigen-bot.
Related Issues (20)
- [BUG] Virus Warning with latest HOT 3
- config.yaml is not used
- [ENH] Set condition attribute for ads
- [ERROR] TimeoutError: No HTML element found using CSS selector '.l-splitpage' within 5 seconds.
- [BUG] VALUE NEGOTIABLE IS NOT WORKING HOT 1
- [BUG] Update fails unreproducably in 40 - 60% of cases with messages "Invalid search result range" and "DOM agent hasn't been enabled"
- [BUG] Error message with more than 25 adverts/display on 2+ pages HOT 2
- [BUG] Failed to set special attribute [kueche_esszimmer.color_s] HOT 9
- [BUG] shipping infos are not saved
- [BUG] TimeoutError: No HTML element found with ID 'my-manageads-adlist' within 5 seconds. HOT 1
- [BUG] There are currently no ads on your profile!
- [BUG] all shipping_options are enabled although just one is in the yaml HOT 1
- [BUG] HOT 1
- browser set up [BUG] HOT 9
- [BUG] SSL: CERTIFICATE_VERIFY_FAILED HOT 2
- [ENH] Save also the city to the zip code
- [BUG] Cannot run in headless mode HOT 2
- [BUG] price_type set before price is set HOT 2
- [ENH] Add option to pause ad creation on captcha
- Deploying the docker image on dockerhub
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 kleinanzeigen-bot.